Do not display user account when there is only one user in popup message.

Signed-off-by: Camila San <hello@camila.codes>
This commit is contained in:
Camila San 2018-02-25 23:57:44 +01:00
parent 4a6a8ca6c6
commit 71f4760215
No known key found for this signature in database
GPG Key ID: A0A1A2FD03979524

View File

@ -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