diff --git a/Telegram/SourceFiles/localstorage.cpp b/Telegram/SourceFiles/localstorage.cpp index 232c63391..6b622d941 100644 --- a/Telegram/SourceFiles/localstorage.cpp +++ b/Telegram/SourceFiles/localstorage.cpp @@ -806,6 +806,7 @@ namespace { if (!_checkStreamStatus(stream)) return false; cSetDesktopNotify(v == 1); + if (App::wnd()) App::wnd()->updateTrayMenu(); } break; case dbiWindowsNotifications: { diff --git a/Telegram/SourceFiles/settingswidget.cpp b/Telegram/SourceFiles/settingswidget.cpp index 7881a47e4..bf93f1150 100644 --- a/Telegram/SourceFiles/settingswidget.cpp +++ b/Telegram/SourceFiles/settingswidget.cpp @@ -1467,12 +1467,12 @@ void SettingsInner::onDesktopNotify() { App::wnd()->notifyClear(); _senderName.setDisabled(true); _messagePreview.setDisabled(true); - Local::writeUserSettings(); } else { _senderName.setDisabled(false); _messagePreview.setDisabled(!_senderName.checked()); - Local::writeUserSettings(); } + Local::writeUserSettings(); + if (App::wnd()) App::wnd()->updateTrayMenu(); } void SettingsInner::enableDisplayNotify(bool enable) diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 3e3d1c01b..ab569abab 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -1171,6 +1171,12 @@ void Window::toggleDisplayNotifyFromTray() { cSetDesktopNotify(!cDesktopNotify()); if (settings) { settings->updateDisplayNotify(); + } else { + if (!cDesktopNotify()) { + notifyClear(); + } + Local::writeUserSettings(); + updateTrayMenu(); } }