2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Topics list in forum chats list entry.

This commit is contained in:
John Preston
2022-11-11 13:24:37 +04:00
parent 996b6bf46a
commit 4c8187f623
15 changed files with 395 additions and 97 deletions

View File

@@ -90,6 +90,12 @@ public:
void clearAllUnreadReactions();
void enumerateTopics(Fn<void(not_null<ForumTopic*>)> action) const;
void listMessageChanged(HistoryItem *from, HistoryItem *to);
[[nodiscard]] int recentTopicsListVersion() const;
void recentTopicsInvalidate(not_null<ForumTopic*> topic);
[[nodiscard]] auto recentTopics() const
-> const std::vector<not_null<ForumTopic*>> &;
[[nodiscard]] rpl::lifetime &lifetime() {
return _lifetime;
}
@@ -100,6 +106,7 @@ private:
std::vector<Fn<void()>> callbacks;
};
void reorderLastTopics();
void requestSomeStale();
void finishTopicRequest(MsgId rootId);
@@ -119,6 +126,9 @@ private:
base::flat_set<MsgId> _creatingRootIds;
std::vector<not_null<ForumTopic*>> _lastTopics;
int _lastTopicsVersion = 0;
rpl::event_stream<> _chatsListChanges;
rpl::event_stream<> _chatsListLoadedEvents;