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

Track forum unread state by topics inside.

This commit is contained in:
John Preston
2022-10-19 17:55:33 +04:00
parent a292f8a34e
commit 08ba277327
12 changed files with 116 additions and 30 deletions

View File

@@ -38,6 +38,7 @@ public:
[[nodiscard]] auto topicDestroyed() const
-> rpl::producer<not_null<ForumTopic*>>;
void preloadTopics();
void requestTopics();
[[nodiscard]] rpl::producer<> chatsListChanges() const;
[[nodiscard]] rpl::producer<> chatsListLoadedEvents() const;
@@ -68,6 +69,10 @@ public:
void clearAllUnreadReactions();
void enumerateTopics(Fn<void(not_null<ForumTopic*>)> action) const;
[[nodiscard]] rpl::lifetime &lifetime() {
return _lifetime;
}
private:
struct TopicRequest {
mtpRequestId id = 0;
@@ -97,6 +102,8 @@ private:
rpl::event_stream<> _chatsListChanges;
rpl::event_stream<> _chatsListLoadedEvents;
rpl::lifetime _lifetime;
};
} // namespace Data