aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/room.cpp8
-rw-r--r--lib/room.h6
2 files changed, 8 insertions, 6 deletions
diff --git a/lib/room.cpp b/lib/room.cpp
index f2e03e94..a4946b65 100644
--- a/lib/room.cpp
+++ b/lib/room.cpp
@@ -815,7 +815,7 @@ void Room::resetNotificationCount()
if( d->notificationCount == 0 )
return;
d->notificationCount = 0;
- emit notificationCountChanged(this);
+ emit notificationCountChanged();
}
int Room::highlightCount() const
@@ -828,7 +828,7 @@ void Room::resetHighlightCount()
if( d->highlightCount == 0 )
return;
d->highlightCount = 0;
- emit highlightCountChanged(this);
+ emit highlightCountChanged();
}
void Room::switchVersion(QString newVersion)
@@ -1343,12 +1343,12 @@ void Room::updateData(SyncRoomData&& data, bool fromCache)
if( data.highlightCount != d->highlightCount )
{
d->highlightCount = data.highlightCount;
- emit highlightCountChanged(this);
+ emit highlightCountChanged();
}
if( data.notificationCount != d->notificationCount )
{
d->notificationCount = data.notificationCount;
- emit notificationCountChanged(this);
+ emit notificationCountChanged();
}
if (roomChanges != Change::NoChange)
{
diff --git a/lib/room.h b/lib/room.h
index f7add412..352c098b 100644
--- a/lib/room.h
+++ b/lib/room.h
@@ -108,6 +108,8 @@ namespace QMatrixClient
Q_PROPERTY(QString readMarkerEventId READ readMarkerEventId WRITE markMessagesAsRead NOTIFY readMarkerMoved)
Q_PROPERTY(bool hasUnreadMessages READ hasUnreadMessages NOTIFY unreadMessagesChanged)
Q_PROPERTY(int unreadCount READ unreadCount NOTIFY unreadMessagesChanged)
+ Q_PROPERTY(int highlightCount READ highlightCount NOTIFY highlightCountChanged RESET resetHighlightCount)
+ Q_PROPERTY(int notificationCount READ notificationCount NOTIFY notificationCountChanged RESET resetNotificationCount)
Q_PROPERTY(QStringList tagNames READ tagNames NOTIFY tagsChanged)
Q_PROPERTY(bool isFavourite READ isFavourite NOTIFY tagsChanged)
Q_PROPERTY(bool isLowPriority READ isLowPriority NOTIFY tagsChanged)
@@ -517,8 +519,8 @@ namespace QMatrixClient
void joinStateChanged(JoinState oldState, JoinState newState);
void typingChanged();
- void highlightCountChanged(Room* room);
- void notificationCountChanged(Room* room);
+ void highlightCountChanged();
+ void notificationCountChanged();
void displayedChanged(bool displayed);
void firstDisplayedEventChanged();