diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp index 713fca59f..370e850e6 100644 --- a/src/gui/owncloudgui.cpp +++ b/src/gui/owncloudgui.cpp @@ -128,6 +128,7 @@ ownCloudGui::ownCloudGui(Application *parent) qmlRegisterType("com.nextcloud.desktopclient", 1, 0, "SortedShareModel"); qmlRegisterType("com.nextcloud.desktopclient", 1, 0, "SyncConflictsModel"); qmlRegisterUncreatableType("com.nextcloud.desktopclient", 1, 0, "QAbstractItemModel", "QAbstractItemModel"); + qmlRegisterUncreatableType("com.nextcloud.desktopclient", 1, 0, "Activity", "Activity"); qmlRegisterUncreatableType("com.nextcloud.desktopclient", 1, 0, "UnifiedSearchResultsListModel", "UnifiedSearchResultsListModel"); qmlRegisterUncreatableType("com.nextcloud.desktopclient", 1, 0, "UserStatus", "Access to Status enum"); diff --git a/src/gui/tray/activitydata.h b/src/gui/tray/activitydata.h index 88a8948d3..c5517d116 100644 --- a/src/gui/tray/activitydata.h +++ b/src/gui/tray/activitydata.h @@ -108,6 +108,22 @@ public: QString messageId; QString messageSent; QString userAvatar; + + [[nodiscard]] bool operator==(const TalkNotificationData &other) const + { + return conversationToken == other.conversationToken && + messageId == other.messageId && + messageSent == other.messageSent && + userAvatar == other.userAvatar; + } + + [[nodiscard]] bool operator!=(const TalkNotificationData &other) const + { + return conversationToken != other.conversationToken || + messageId != other.messageId || + messageSent != other.messageSent || + userAvatar != other.userAvatar; + } }; /* ==================================================================== */ @@ -120,6 +136,9 @@ public: class Activity { Q_GADGET + Q_PROPERTY(OCC::Activity::Type type MEMBER _type) + Q_PROPERTY(OCC::TalkNotificationData talkNotificationData MEMBER _talkNotificationData) + Q_PROPERTY(QVariantMap subjectRichParameters MEMBER _subjectRichParameters) public: using Identifier = QPair;