diff --git a/src/gui/tray/Window.qml b/src/gui/tray/Window.qml index 3c6a22a9701f8..f4369803baed4 100644 --- a/src/gui/tray/Window.qml +++ b/src/gui/tray/Window.qml @@ -899,9 +899,12 @@ ApplicationWindow { onActivityItemClicked: { model.slotTriggerDefaultAction(index) } - onCountChanged: { - if (contentY > 0) { - newActivitiesButton.active = true; + Connections { + target: activityModel + onInteractiveActivityReceived: { + if (activityList.contentY > 0) { + newActivitiesButton.active = true; + } } } } diff --git a/src/gui/tray/activitylistmodel.cpp b/src/gui/tray/activitylistmodel.cpp index 078438f1c6894..b16da6f33184b 100644 --- a/src/gui/tray/activitylistmodel.cpp +++ b/src/gui/tray/activitylistmodel.cpp @@ -636,6 +636,13 @@ void ActivityListModel::addNotificationToActivityList(const Activity &activity) qCDebug(lcActivity) << "Notification successfully added to the notification list: " << activity._subject; addEntriesToActivityList({activity}); _notificationLists.prepend(activity); + for (const auto &link : activity._links) { + if (link._verb == QByteArrayLiteral("POST") + || link._verb == QByteArrayLiteral("REPLY") + || link._verb == QByteArrayLiteral("WEB")) { + emit interactiveActivityReceived(); + } + } } void ActivityListModel::addSyncFileItemToActivityList(const Activity &activity) diff --git a/src/gui/tray/activitylistmodel.h b/src/gui/tray/activitylistmodel.h index 6335e8413f185..6251a12e9a1ff 100644 --- a/src/gui/tray/activitylistmodel.h +++ b/src/gui/tray/activitylistmodel.h @@ -151,6 +151,8 @@ public slots: void activityJobStatusCode(int statusCode); void sendNotificationRequest(const QString &accountName, const QString &link, const QByteArray &verb, int row); + void interactiveActivityReceived(); + protected: [[nodiscard]] bool currentlyFetching() const;