From 71f47602152b4232032045f3618fd01faebdafe6 Mon Sep 17 00:00:00 2001 From: Camila San Date: Sun, 25 Feb 2018 23:57:44 +0100 Subject: [PATCH] Do not display user account when there is only one user in popup message. Signed-off-by: Camila San --- src/gui/activitywidget.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/gui/activitywidget.cpp b/src/gui/activitywidget.cpp index 37dacb5dda..1396745119 100644 --- a/src/gui/activitywidget.cpp +++ b/src/gui/activitywidget.cpp @@ -249,8 +249,6 @@ void ActivityWidget::slotBuildNotificationDisplay(const ActivityList &list) bool newNotificationShown = false; foreach (auto activity, list) { - qDebug() << "Notification list" - << activity._subject; if (_blacklistedNotifications.contains(activity)) { qCInfo(lcActivity) << "Activity in blacklist, skip"; continue; @@ -311,9 +309,12 @@ void ActivityWidget::slotBuildNotificationDisplay(const ActivityList &list) // Assemble a tray notification ConfigFile cfg; if(cfg.optionalServerNotifications()){ - QString log = tr("Notification for %1.").arg(activity._accName); - emit guiLog(log, activity._subject); - } + if(AccountManager::instance()->accounts().count() == 1){ + emit guiLog(activity._subject, ""); + } else { + emit guiLog(activity._subject, activity._accName); + } + } } // check if there are widgets that have no corresponding activity from