From 415d81703488b6ac3ae6270989d46d5789009841 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 26 Jul 2019 18:09:42 +0200 Subject: [PATCH] Show notification without sound for silent message. --- Telegram/SourceFiles/window/notifications_manager.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Telegram/SourceFiles/window/notifications_manager.cpp b/Telegram/SourceFiles/window/notifications_manager.cpp index 7bdc9a5fd..864b79a4e 100644 --- a/Telegram/SourceFiles/window/notifications_manager.cpp +++ b/Telegram/SourceFiles/window/notifications_manager.cpp @@ -72,11 +72,6 @@ void System::schedule( ? item->from().get() : nullptr; - if (item->isSilent()) { - history->popNotification(item); - return; - } - history->owner().requestNotifySettings(history->peer); if (notifyBy) { history->owner().requestNotifySettings(notifyBy); @@ -112,7 +107,9 @@ void System::schedule( } auto when = ms + delay; - _whenAlerts[history].insert(when, notifyBy); + if (!item->isSilent()) { + _whenAlerts[history].insert(when, notifyBy); + } if (Global::DesktopNotify() && !Platform::Notifications::SkipToast()) { auto &whenMap = _whenMaps[history]; if (whenMap.constFind(item->id) == whenMap.cend()) {