Merge pull request #2486 from nextcloud/fix-notification

Connect signal guiLog to slot to display systray message.
This commit is contained in:
Camila 2020-09-29 19:26:06 +02:00 committed by GitHub
commit 1b1975e01d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -92,7 +92,7 @@ void ServerNotificationHandler::slotNotificationsReceived(const QJsonDocument &j
auto json = element.toObject();
a._type = Activity::NotificationType;
a._accName = ai->account()->displayName();
a._id = json.value("activity_id").toInt();
a._id = json.value("notification_id").toInt();
//need to know, specially for remote_share
a._objectType = json.value("object_type").toString();
@ -148,4 +148,4 @@ void ServerNotificationHandler::slotNotificationsReceived(const QJsonDocument &j
deleteLater();
}
}
}

View file

@ -7,6 +7,7 @@
#include "ocsjob.h"
#include "configfile.h"
#include "notificationconfirmjob.h"
#include "logger.h"
#include <QDesktopServices>
#include <QIcon>
@ -45,6 +46,8 @@ User::User(AccountStatePtr &account, const bool &isCurrent, QObject *parent)
connect(_account->account().data(), &Account::accountChangedDisplayName, this, &User::nameChanged);
connect(FolderMan::instance(), &FolderMan::folderListChanged, this, &User::hasLocalFolderChanged);
connect(this, &User::guiLog, Logger::instance(), &Logger::guiLog);
}
void User::slotBuildNotificationDisplay(const ActivityList &list)