From 11abaac7c1905f26923e4a6e255cc842c29d79fb Mon Sep 17 00:00:00 2001 From: AlexeyZavar Date: Fri, 19 Apr 2024 02:18:38 +0300 Subject: [PATCH] fix: hide notifications from blocked users e.g. when in shared group chats with enabled notifications sound still plays, lazy to fix that --- .../SourceFiles/window/notifications_manager_default.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Telegram/SourceFiles/window/notifications_manager_default.cpp b/Telegram/SourceFiles/window/notifications_manager_default.cpp index 580ae3ca3..3f4beb69f 100644 --- a/Telegram/SourceFiles/window/notifications_manager_default.cpp +++ b/Telegram/SourceFiles/window/notifications_manager_default.cpp @@ -44,6 +44,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include // AyuGram includes +#include "ayu/utils/telegram_helpers.h" #include "ayu/features/streamer_mode/streamer_mode.h" @@ -251,6 +252,11 @@ void Manager::showNextFromQueue() { auto queued = _queuedNotifications.front(); _queuedNotifications.pop_front(); + if (queued.item && isMessageHidden(queued.item)) { + --count; + continue; + } + subscribeToSession(&queued.history->session()); _notifications.push_back(std::make_unique( this,