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

Use only shared media code for pinned tracking.

This commit is contained in:
John Preston
2020-10-21 14:07:49 +03:00
parent 59b4c5dad9
commit cd5cad72bd
17 changed files with 162 additions and 273 deletions

View File

@@ -262,9 +262,7 @@ void ApplyUserUpdate(not_null<UserData*> user, const MTPDuserFull &update) {
user->setBotInfoVersion(-1);
}
if (const auto pinned = update.vpinned_msg_id()) {
user->setTopPinnedMessageId(pinned->v);
} else {
user->clearPinnedMessages();
SetTopPinnedMessageId(user, pinned->v);
}
user->setFullFlags(update.vflags().v);
user->setIsBlocked(update.is_blocked());