mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 15:06:08 +03:00
expose some properties of OCC::Activity gadget class
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
parent
ce69856bfa
commit
f51af1734d
2 changed files with 20 additions and 0 deletions
|
@ -128,6 +128,7 @@ ownCloudGui::ownCloudGui(Application *parent)
|
|||
qmlRegisterType<SortedShareModel>("com.nextcloud.desktopclient", 1, 0, "SortedShareModel");
|
||||
qmlRegisterType<SyncConflictsModel>("com.nextcloud.desktopclient", 1, 0, "SyncConflictsModel");
|
||||
qmlRegisterUncreatableType<QAbstractItemModel>("com.nextcloud.desktopclient", 1, 0, "QAbstractItemModel", "QAbstractItemModel");
|
||||
qmlRegisterUncreatableType<Activity>("com.nextcloud.desktopclient", 1, 0, "Activity", "Activity");
|
||||
|
||||
qmlRegisterUncreatableType<UnifiedSearchResultsListModel>("com.nextcloud.desktopclient", 1, 0, "UnifiedSearchResultsListModel", "UnifiedSearchResultsListModel");
|
||||
qmlRegisterUncreatableType<UserStatus>("com.nextcloud.desktopclient", 1, 0, "UserStatus", "Access to Status enum");
|
||||
|
|
|
@ -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<qlonglong, QString>;
|
||||
|
|
Loading…
Reference in a new issue