Suggested rooms spaces

Add the ability to set and show suggested rooms for spaces. 

This is just adding the basic functionality, we can do more things with it later like sort/filter the space home for example.
This commit is contained in:
James Graham
2023-11-11 13:32:19 +00:00
parent 624578ec77
commit aab69c5bae
7 changed files with 127 additions and 18 deletions

View File

@@ -562,7 +562,7 @@ public:
* Will fail if the user doesn't have the required privileges or this room is
* not a space.
*/
Q_INVOKABLE void addChild(const QString &childId, bool setChildParent = false, bool canonical = false);
Q_INVOKABLE void addChild(const QString &childId, bool setChildParent = false, bool canonical = false, bool suggested = false);
/**
* @brief Remove the given room as a child.
@@ -572,6 +572,19 @@ public:
*/
Q_INVOKABLE void removeChild(const QString &childId, bool unsetChildParent = false);
/**
* @brief Whether the given child is a suggested room in the space.
*/
Q_INVOKABLE bool isSuggested(const QString &childId);
/**
* @brief Toggle whether the given child is a suggested room in the space.
*
* Will fail if the user doesn't have the required privileges, this room is
* not a space or the given room is not a child of this space.
*/
Q_INVOKABLE void toggleChildSuggested(const QString &childId);
bool isInvite() const;
Q_INVOKABLE void clearInvitationNotification();