Fix 'mute chat' for chats that have never been muted, fixes #144

This commit is contained in:
Sebastian Wolf 2020-11-13 22:42:48 +01:00
parent 301f52603a
commit 63ce0f92d2
3 changed files with 3 additions and 0 deletions

View file

@ -41,6 +41,7 @@ PhotoTextsListItem {
} else {
newNotificationSettings.mute_for = 6666666;
}
newNotificationSettings.use_default_mute_for = false;
tdLibWrapper.setChatNotificationSettings(chat_id, newNotificationSettings);
}
text: display.notification_settings.mute_for > 0 ? qsTr("Unmute Chat") : qsTr("Mute Chat")

View file

@ -212,6 +212,7 @@ Page {
} else {
newNotificationSettings.mute_for = 6666666;
}
newNotificationSettings.use_default_mute_for = false;
tdLibWrapper.setChatNotificationSettings(chat_id, newNotificationSettings);
}
text: chatInformation.notification_settings.mute_for > 0 ? qsTr("Unmute Chat") : qsTr("Mute Chat")

View file

@ -412,6 +412,7 @@ Page {
} else {
newNotificationSettings.mute_for = 6666666;
}
newNotificationSettings.use_default_mute_for = false;
tdLibWrapper.setChatNotificationSettings(chatInformation.id, newNotificationSettings);
}
text: chatInformation.notification_settings.mute_for > 0 ? qsTr("Unmute Chat") : qsTr("Mute Chat")