From 3b0a541bc8035b26cb82359482b01b340a67c635 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 58ad1b9e1..0d2ae7e6b 100644 --- a/Telegram/SourceFiles/window/notifications_manager.cpp +++ b/Telegram/SourceFiles/window/notifications_manager.cpp @@ -861,6 +861,12 @@ QString Manager::addTargetAccountName( const QString &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) {