summary refs log tree commit diff
path: root/src/timeline/TimelineModel.h
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-06-18 14:05:52 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2021-06-25 11:34:18 +0200
commitf349b0cce0335c2c9f6aaabfad9315e80bc72677 (patch)
tree1333a5f67f3ad370102f01b9bda3790e6d61d739 /src/timeline/TimelineModel.h
parentFix hiding rooms from a space (diff)
downloadnheko-f349b0cce0335c2c9f6aaabfad9315e80bc72677.tar.xz
Hide spaces by default, unless they are in the current space filter
Diffstat (limited to '')
-rw-r--r--src/timeline/TimelineModel.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/timeline/TimelineModel.h b/src/timeline/TimelineModel.h
index 3ebbe120..42aa136f 100644
--- a/src/timeline/TimelineModel.h
+++ b/src/timeline/TimelineModel.h
@@ -161,6 +161,7 @@ class TimelineModel : public QAbstractListModel
         Q_PROPERTY(QString roomName READ roomName NOTIFY roomNameChanged)
         Q_PROPERTY(QString roomAvatarUrl READ roomAvatarUrl NOTIFY roomAvatarUrlChanged)
         Q_PROPERTY(QString roomTopic READ roomTopic NOTIFY roomTopicChanged)
+        Q_PROPERTY(bool isSpace READ isSpace CONSTANT)
         Q_PROPERTY(InputBar *input READ input CONSTANT)
         Q_PROPERTY(Permissions *permissions READ permissions NOTIFY permissionsChanged)
 
@@ -262,6 +263,7 @@ public:
         RelatedInfo relatedInfo(QString id);
 
         DescInfo lastMessage() const { return lastMessage_; }
+        bool isSpace() const { return isSpace_; }
 
 public slots:
         void setCurrentIndex(int index);
@@ -366,9 +368,6 @@ private:
 
         QString room_id_;
 
-        bool decryptDescription     = true;
-        bool m_paginationInProgress = false;
-
         QString currentId, currentReadId;
         QString reply_, edit_;
         QString textBeforeEdit, replyBeforeEdit;
@@ -388,6 +387,10 @@ private:
         friend struct SendMessageVisitor;
 
         int notification_count = 0, highlight_count = 0;
+
+        bool decryptDescription     = true;
+        bool m_paginationInProgress = false;
+        bool isSpace_               = false;
 };
 
 template<class T>