2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Support default General topic in forums.

This commit is contained in:
John Preston
2022-09-26 17:37:32 +04:00
parent 2201159da5
commit 73e56b0340
23 changed files with 385 additions and 183 deletions

View File

@@ -26,6 +26,8 @@ class Session;
class ForumTopic final : public Dialogs::Entry {
public:
static constexpr auto kGeneralId = 1;
ForumTopic(not_null<History*> forum, MsgId rootId);
ForumTopic(const ForumTopic &) = delete;
@@ -33,6 +35,9 @@ public:
[[nodiscard]] not_null<History*> forum() const;
[[nodiscard]] MsgId rootId() const;
[[nodiscard]] bool isGeneral() const {
return (_rootId == kGeneralId);
}
void applyTopic(const MTPForumTopic &topic);
@@ -88,7 +93,6 @@ private:
int unreadCount,
MsgId maxInboxRead,
MsgId maxOutboxRead);
void applyChatListMessage(HistoryItem *item);
void setLastMessage(HistoryItem *item);
void setLastServerMessage(HistoryItem *item);