Fix updating last pinned message.

GitOrigin-RevId: 880ef5fa1ef5c0e5ea0746ad8251912ee7ab672f
This commit is contained in:
levlam 2020-10-28 20:20:11 +03:00
parent 6572821eff
commit 0a6ec2ce1c

View File

@ -29890,7 +29890,9 @@ void MessagesManager::unpin_all_dialog_messages(DialogId dialog_id, Promise<Unit
on_message_changed(d, m, true, "unpin_all_dialog_messages"); on_message_changed(d, m, true, "unpin_all_dialog_messages");
} }
if (d->last_pinned_message_id != MessageId()) {
set_dialog_last_pinned_message_id(d, MessageId()); set_dialog_last_pinned_message_id(d, MessageId());
}
if (d->message_count_by_index[message_search_filter_index(MessageSearchFilter::Pinned)] != 0) { if (d->message_count_by_index[message_search_filter_index(MessageSearchFilter::Pinned)] != 0) {
d->message_count_by_index[message_search_filter_index(MessageSearchFilter::Pinned)] = 0; d->message_count_by_index[message_search_filter_index(MessageSearchFilter::Pinned)] = 0;
on_dialog_updated(dialog_id, "unpin_all_dialog_messages"); on_dialog_updated(dialog_id, "unpin_all_dialog_messages");