2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Handle forum-non_forum changes in realtime.

This commit is contained in:
John Preston
2022-10-12 16:57:17 +04:00
parent 04d06e5b12
commit 6695eda1be
35 changed files with 286 additions and 499 deletions

View File

@@ -34,6 +34,9 @@ public:
[[nodiscard]] not_null<History*> history() const;
[[nodiscard]] not_null<ChannelData*> channel() const;
[[nodiscard]] not_null<Dialogs::MainList*> topicsList();
[[nodiscard]] rpl::producer<> destroyed() const;
[[nodiscard]] auto topicDestroyed() const
-> rpl::producer<not_null<ForumTopic*>>;
void requestTopics();
[[nodiscard]] rpl::producer<> chatsListChanges() const;
@@ -75,6 +78,7 @@ private:
const not_null<History*> _history;
base::flat_map<MsgId, std::unique_ptr<ForumTopic>> _topics;
rpl::event_stream<not_null<ForumTopic*>> _topicDestroyed;
Dialogs::MainList _topicsList;
base::flat_map<MsgId, TopicRequest> _topicRequests;