mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-03 07:56:03 +00:00
Fix "Topic Author" badge for the new topics.
This commit is contained in:
@@ -285,7 +285,7 @@ void ForumTopic::readTillEnd() {
|
||||
void ForumTopic::applyTopic(const MTPDforumTopic &data) {
|
||||
Expects(_rootId == data.vid().v);
|
||||
|
||||
_creatorId = peerFromMTP(data.vfrom_id());
|
||||
applyCreator(peerFromMTP(data.vfrom_id()));
|
||||
_creationDate = data.vdate().v;
|
||||
|
||||
applyTitle(qs(data.vtitle()));
|
||||
@@ -328,6 +328,13 @@ void ForumTopic::applyTopic(const MTPDforumTopic &data) {
|
||||
unreadReactions().setCount(data.vunread_reactions_count().v);
|
||||
}
|
||||
|
||||
void ForumTopic::applyCreator(PeerId creatorId) {
|
||||
if (_creatorId != creatorId) {
|
||||
_creatorId = creatorId;
|
||||
session().changes().topicUpdated(this, UpdateFlag::Creator);
|
||||
}
|
||||
}
|
||||
|
||||
bool ForumTopic::closed() const {
|
||||
return _flags & Flag::Closed;
|
||||
}
|
||||
|
Reference in New Issue
Block a user