[Improvement] Do not show account name in notification for active account

This commit is contained in:
Eric Kotato 2022-09-11 05:12:30 +03:00 committed by Eric Kotato
parent d2a8a1d7ae
commit 3b0a541bc8

View file

@ -861,6 +861,12 @@ QString Manager::addTargetAccountName(
const QString &title, const QString &title,
not_null<Main::Session*> session) { not_null<Main::Session*> session) {
const auto add = [&] { 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()) { for (const auto &[index, account] : Core::App().domain().accounts()) {
if (const auto other = account->maybeSession()) { if (const auto other = account->maybeSession()) {
if (other != session) { if (other != session) {