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

Support General topic somehow.

This commit is contained in:
John Preston
2022-11-29 15:54:47 +04:00
parent 8cd5105813
commit 57af221d39
12 changed files with 29 additions and 27 deletions

View File

@@ -51,6 +51,8 @@ class Forum;
class ForumTopic final : public Thread {
public:
static constexpr auto kGeneralId = 1;
ForumTopic(not_null<Forum*> forum, MsgId rootId);
~ForumTopic();
@@ -58,6 +60,10 @@ public:
return history();
}
[[nodiscard]] bool isGeneral() const {
return (_rootId == kGeneralId);
}
[[nodiscard]] std::shared_ptr<RepliesList> replies() const;
[[nodiscard]] not_null<ChannelData*> channel() const;
[[nodiscard]] not_null<History*> history() const;