Don't compare story notification settings for chat notification settings exceptions.

This commit is contained in:
levlam 2023-07-04 17:23:22 +03:00
parent 6b010c0207
commit eb38a48d17
2 changed files with 8 additions and 3 deletions

View File

@ -170,12 +170,15 @@ DialogNotificationSettings get_dialog_notification_settings(tl_object_ptr<telegr
bool are_default_dialog_notification_settings(const DialogNotificationSettings &settings, bool compare_sound) {
return settings.use_default_mute_until && (!compare_sound || is_notification_sound_default(settings.sound)) &&
settings.use_default_show_preview && settings.use_default_mute_stories &&
(!compare_sound || is_notification_sound_default(settings.story_sound)) &&
settings.use_default_hide_story_sender && settings.use_default_disable_pinned_message_notifications &&
settings.use_default_show_preview && settings.use_default_disable_pinned_message_notifications &&
settings.use_default_disable_mention_notifications;
}
bool are_default_story_notification_settings(const DialogNotificationSettings &settings) {
return settings.use_default_mute_stories && is_notification_sound_default(settings.story_sound) &&
settings.use_default_hide_story_sender;
}
NeedUpdateDialogNotificationSettings need_update_dialog_notification_settings(
const DialogNotificationSettings *current_settings, const DialogNotificationSettings &new_settings) {
NeedUpdateDialogNotificationSettings result;

View File

@ -83,6 +83,8 @@ DialogNotificationSettings get_dialog_notification_settings(tl_object_ptr<telegr
bool are_default_dialog_notification_settings(const DialogNotificationSettings &settings, bool compare_sound);
bool are_default_story_notification_settings(const DialogNotificationSettings &settings);
struct NeedUpdateDialogNotificationSettings {
bool need_update_server = false;
bool need_update_local = false;