2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 06:55:58 +00:00

Support topic on-the-fly creation.

This commit is contained in:
John Preston
2022-10-04 19:34:45 +04:00
parent 065d2e2ac9
commit 3722e55b67
32 changed files with 447 additions and 130 deletions

View File

@@ -29,6 +29,8 @@ ForumTopic::ForumTopic(not_null<History*> history, MsgId rootId)
, _rootId(rootId) {
}
ForumTopic::~ForumTopic() = default;
not_null<ChannelData*> ForumTopic::channel() const {
return _history->peer->asChannel();
}
@@ -45,6 +47,10 @@ MsgId ForumTopic::rootId() const {
return _rootId;
}
void ForumTopic::setRealRootId(MsgId realId) {
_rootId = realId;
}
void ForumTopic::applyTopic(const MTPForumTopic &topic) {
Expects(_rootId == topic.data().vid().v);