Notification Consistency
Make sure that the new rules for counting notifications for muted, mention and low priority rooms is applied consistently to the room list, space drawer and the task manager notification badge implements #644
This commit is contained in:
@@ -133,6 +133,13 @@ class NeoChatRoom : public Quotient::Room
|
||||
*/
|
||||
Q_PROPERTY(qsizetype childrenNotificationCount READ childrenNotificationCount NOTIFY childrenNotificationCountChanged)
|
||||
|
||||
/**
|
||||
* @brief Whether this room's children have any highlight notifications.
|
||||
*
|
||||
* Will always return false if this is not a space.
|
||||
*/
|
||||
Q_PROPERTY(bool childrenHaveHighlightNotifications READ childrenHaveHighlightNotifications NOTIFY childrenHaveHighlightNotificationsChanged)
|
||||
|
||||
/**
|
||||
* @brief Whether the local user has an invite to the room.
|
||||
*
|
||||
@@ -405,6 +412,16 @@ public:
|
||||
*/
|
||||
[[nodiscard]] bool lastEventIsSpoiler() const;
|
||||
|
||||
/**
|
||||
* @brief Return the notification count for the room accounting for tags and notification state.
|
||||
*
|
||||
* The following rules are observed:
|
||||
* - Rooms tagged as low priority or mentions and keywords notification state
|
||||
* only return the number of highlights.
|
||||
* - Muted rooms always return 0.
|
||||
*/
|
||||
int contextAwareNotificationCount() const;
|
||||
|
||||
[[nodiscard]] bool hasFileUploading() const;
|
||||
void setHasFileUploading(bool value);
|
||||
|
||||
@@ -535,6 +552,8 @@ public:
|
||||
|
||||
qsizetype childrenNotificationCount();
|
||||
|
||||
bool childrenHaveHighlightNotifications() const;
|
||||
|
||||
/**
|
||||
* @brief Add the given room as a child.
|
||||
*
|
||||
@@ -825,6 +844,7 @@ Q_SIGNALS:
|
||||
void canonicalParentChanged();
|
||||
void lastActiveTimeChanged();
|
||||
void childrenNotificationCountChanged();
|
||||
void childrenHaveHighlightNotificationsChanged();
|
||||
void isInviteChanged();
|
||||
void readOnlyChanged();
|
||||
void displayNameChanged();
|
||||
|
||||
Reference in New Issue
Block a user