mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-27 07:52:57 +02:00
fix: hide messages group
This commit is contained in:
parent
2250fe75c4
commit
a8fb7cd225
1 changed files with 8 additions and 3 deletions
|
@ -207,14 +207,19 @@ void AddHideMessageAction(not_null<Ui::PopupMenu*> menu, HistoryItem *item) {
|
|||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue