From 421b15c05c605c8f4adc63433b00e37d56ac9da8 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Tue, 20 Sep 2022 21:26:28 +0200 Subject: Show the community of a room --- src/timeline/TimelineModel.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/timeline/TimelineModel.h') diff --git a/src/timeline/TimelineModel.h b/src/timeline/TimelineModel.h index 295bc69b..ea6daa34 100644 --- a/src/timeline/TimelineModel.h +++ b/src/timeline/TimelineModel.h @@ -22,6 +22,7 @@ #include "MemberList.h" #include "Permissions.h" #include "ReadReceiptsModel.h" +#include "ui/RoomSummary.h" namespace mtx::http { using RequestErr = const std::optional &; @@ -197,6 +198,7 @@ class TimelineModel : public QAbstractListModel QString directChatOtherUserId READ directChatOtherUserId NOTIFY directChatOtherUserIdChanged) Q_PROPERTY(InputBar *input READ input CONSTANT) Q_PROPERTY(Permissions *permissions READ permissions NOTIFY permissionsChanged) + Q_PROPERTY(RoomSummary *parentSpace READ parentSpace NOTIFY parentSpaceChanged) public: explicit TimelineModel(TimelineViewManager *manager, @@ -397,6 +399,7 @@ public slots: Permissions *permissions() { return &permissions_; } QString roomAvatarUrl() const; QString roomId() const { return room_id_; } + RoomSummary *parentSpace(); bool hasMentions() const { return highlight_count > 0; } int notificationCount() const { return notification_count; } @@ -431,6 +434,7 @@ signals: void addPendingMessageToStore(mtx::events::collections::TimelineEvents event); void updateFlowEventId(std::string event_id); + void parentSpaceChanged(); void encryptionChanged(); void fullyReadEventIdChanged(); void trustlevelChanged(); @@ -488,6 +492,9 @@ private: bool isEncrypted_ = false; std::string last_event_id; std::string fullyReadEventId_; + + std::unique_ptr parentSummary = nullptr; + bool parentChecked = false; }; template -- cgit 1.5.1