mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 07:33:52 +02:00
Fix notification receiver name.
This commit is contained in:
parent
613a2f358a
commit
06c9e55c26
1 changed files with 11 additions and 1 deletions
|
@ -577,7 +577,17 @@ Manager::DisplayOptions Manager::GetNotificationOptions(HistoryItem *item) {
|
||||||
QString Manager::addTargetAccountName(
|
QString Manager::addTargetAccountName(
|
||||||
const QString &title,
|
const QString &title,
|
||||||
not_null<Main::Session*> session) {
|
not_null<Main::Session*> session) {
|
||||||
return (Core::App().domain().accounts().size() > 1)
|
const auto add = [&] {
|
||||||
|
for (const auto &[index, account] : Core::App().domain().accounts()) {
|
||||||
|
if (const auto other = account->maybeSession()) {
|
||||||
|
if (other != session) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}();
|
||||||
|
return add
|
||||||
? (title
|
? (title
|
||||||
+ accountNameSeparator()
|
+ accountNameSeparator()
|
||||||
+ (session->user()->username.isEmpty()
|
+ (session->user()->username.isEmpty()
|
||||||
|
|
Loading…
Add table
Reference in a new issue