Space notification count

Show the number of notifications for a space if it isn't selected. This respects choices like low priority only adding highlights.
This commit is contained in:
James Graham
2024-02-18 11:04:56 +00:00
parent fcf64a7e1b
commit 1b59917f16
9 changed files with 217 additions and 29 deletions

View File

@@ -44,6 +44,11 @@ public:
return &instance();
}
/**
* @brief Returns the list of parent spaces for a child if any.
*/
QStringList parentSpaces(const QString &roomId);
/**
* @brief Whether the given room is a member of the given space.
*/
@@ -54,6 +59,11 @@ public:
*/
[[nodiscard]] QList<QString> &getRoomListForSpace(const QString &spaceId, bool updateCache);
/**
* @brief Return the number of notifications for the child rooms in a given space ID.
*/
qsizetype notificationCountForSpace(const QString &spaceId);
/**
* @brief Returns whether the room is a child space of any space.
*
@@ -69,6 +79,7 @@ public:
Q_SIGNALS:
void spaceHierarchyChanged();
void connectionChanged();
void spaceNotifcationCountChanged(const QStringList &spaces);
private Q_SLOTS:
void addSpaceToHierarchy(Quotient::Room *room);