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

Unify message sending, track forum topic icons.

This commit is contained in:
John Preston
2022-09-27 20:52:35 +04:00
parent 3b3792ef75
commit 9f652b0d3f
29 changed files with 477 additions and 259 deletions

View File

@@ -31,13 +31,22 @@ public:
[[nodiscard]] rpl::producer<> chatsListChanges() const;
[[nodiscard]] rpl::producer<> chatsListLoadedEvents() const;
void applyTopicAdded(MsgId rootId, const QString &title);
void applyTopicAdded(
MsgId rootId,
const QString &title,
DocumentId iconId);
void applyTopicRemoved(MsgId rootId);
[[nodiscard]] ForumTopic *topicFor(not_null<HistoryItem*> item);
[[nodiscard]] ForumTopic *topicFor(MsgId rootId);
void applyReceivedTopics(const MTPmessages_ForumTopics &topics);
[[nodiscard]] MsgId reserveCreatingId(
const QString &title,
DocumentId iconId);
void discardCreatingId(MsgId rootId);
[[nodiscard]] bool creating(MsgId rootId) const;
private:
void applyReceivedTopics(
const MTPmessages_ForumTopics &topics,
@@ -54,6 +63,8 @@ private:
MsgId _offsetTopicId = 0;
bool _allLoaded = false;
base::flat_set<MsgId> _creatingRootIds;
rpl::event_stream<> _chatsListChanges;
rpl::event_stream<> _chatsListLoadedEvents;