mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 22:16:14 +00:00
Track multiple pinned messages in MessagesList.
This commit is contained in:
@@ -383,9 +383,7 @@ void ChannelData::setUnavailableReasons(
|
||||
void ChannelData::setAvailableMinId(MsgId availableMinId) {
|
||||
if (_availableMinId != availableMinId) {
|
||||
_availableMinId = availableMinId;
|
||||
if (pinnedMessageId() <= _availableMinId) {
|
||||
clearPinnedMessage();
|
||||
}
|
||||
clearPinnedMessages(_availableMinId + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -772,9 +770,9 @@ void ApplyChannelUpdate(
|
||||
}
|
||||
}
|
||||
if (const auto pinned = update.vpinned_msg_id()) {
|
||||
channel->setPinnedMessageId(pinned->v);
|
||||
channel->setTopPinnedMessageId(pinned->v);
|
||||
} else {
|
||||
channel->clearPinnedMessage();
|
||||
channel->clearPinnedMessages();
|
||||
}
|
||||
if (channel->isMegagroup()) {
|
||||
const auto stickerSet = update.vstickerset();
|
||||
|
Reference in New Issue
Block a user