mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 07:37:11 +02:00
Fix a possible crash in Clear History.
This commit is contained in:
parent
f9f52302bb
commit
47d2ecf629
1 changed files with 4 additions and 1 deletions
|
@ -1391,12 +1391,15 @@ void HistoryMessage::applyEdition(const MTPDmessage &message) {
|
|||
|
||||
void HistoryMessage::applyEdition(const MTPDmessageService &message) {
|
||||
if (message.vaction().type() == mtpc_messageActionHistoryClear) {
|
||||
const auto wasGrouped = history()->owner().groups().isGrouped(this);
|
||||
setReplyMarkup(nullptr);
|
||||
refreshMedia(nullptr);
|
||||
setEmptyText();
|
||||
setViewsCount(-1);
|
||||
setForwardsCount(-1);
|
||||
|
||||
if (wasGrouped) {
|
||||
history()->owner().groups().unregisterMessage(this);
|
||||
}
|
||||
finishEditionToEmpty();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue