From 5786f65dcbcf0dc17e0299ed10b9ae545bf2d59b Mon Sep 17 00:00:00 2001 From: RadRussianRus Date: Sun, 11 Sep 2022 05:12:30 +0300 Subject: [PATCH] [Improvement] Do not show account name in notification for active account --- Telegram/SourceFiles/window/notifications_manager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Telegram/SourceFiles/window/notifications_manager.cpp b/Telegram/SourceFiles/window/notifications_manager.cpp index 052abca8f..732e2ded8 100644 --- a/Telegram/SourceFiles/window/notifications_manager.cpp +++ b/Telegram/SourceFiles/window/notifications_manager.cpp @@ -1008,6 +1008,12 @@ TextWithEntities Manager::addTargetAccountName( TextWithEntities title, not_null session) { const auto add = [&] { + if (const auto activeSession = Core::App().domain().active().maybeSession()) { + if (session == activeSession) { + return false; + } + } + for (const auto &[index, account] : Core::App().domain().accounts()) { if (const auto other = account->maybeSession()) { if (other != session) {