fix: hide messages group

This commit is contained in:
Neurotoxin001 2025-06-29 22:28:41 +03:00 committed by GitHub
parent 2250fe75c4
commit a8fb7cd225
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -207,14 +207,19 @@ void AddHideMessageAction(not_null<Ui::PopupMenu*> menu, HistoryItem *item) {
} }
const auto history = item->history(); const auto history = item->history();
const auto owner = &history->owner();
menu->addAction( menu->addAction(
tr::ayu_ContextHideMessage(tr::now), tr::ayu_ContextHideMessage(tr::now),
[=]() [=]()
{ {
item->destroy(); const auto ids = owner->itemOrItsGroup(item);
for (const auto &fullId : ids) {
if (const auto current = owner->message(fullId)) {
current->destroy();
AyuState::hide(current);
}
}
history->requestChatListMessage(); history->requestChatListMessage();
AyuState::hide(item);
}, },
&st::menuIconClear); &st::menuIconClear);
} }