The "Hide" context menu action now hides every media item in an album instead of only the first one

This commit is contained in:
Neurotoxin001 2025-06-29 14:32:31 +03:00
parent 2250fe75c4
commit a0fcf73b3b

View file

@ -206,15 +206,20 @@ void AddHideMessageAction(not_null<Ui::PopupMenu*> menu, HistoryItem *item) {
return;
}
const auto history = item->history();
const auto history = item->history();
const auto owner = &history->owner();
menu->addAction(
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();
AyuState::hide(item);
},
&st::menuIconClear);
}