mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 22:16:14 +00:00
Alpha version 0.10.22: critical bug fixes.
This commit is contained in:
@@ -447,11 +447,12 @@ void RichDeleteMessageBox::deleteAndClear() {
|
||||
App::main()->deleteAllFromUser(_channel, _from);
|
||||
}
|
||||
if (auto item = App::histItemById(_channel ? peerToChannel(_channel->id) : 0, _msgId)) {
|
||||
bool wasLast = (item->history()->lastMsg == item);
|
||||
auto wasLast = (item->history()->lastMsg == item);
|
||||
item->destroy();
|
||||
|
||||
if (_msgId > 0) {
|
||||
App::main()->deleteMessages(_channel, QVector<MTPint>(1, MTP_int(_msgId)));
|
||||
auto forEveryone = true;
|
||||
App::main()->deleteMessages(_channel, QVector<MTPint>(1, MTP_int(_msgId)), forEveryone);
|
||||
} else if (wasLast) {
|
||||
App::main()->checkPeerHistory(_channel);
|
||||
}
|
||||
|
Reference in New Issue
Block a user