move "Delete message" to a sub-menu (#6100)

This commit is contained in:
pajlada
2025-03-22 11:50:10 +01:00
committed by GitHub
parent 41acd4e971
commit 584cd275fa
2 changed files with 6 additions and 1 deletions
+1
View File
@@ -2,6 +2,7 @@
## Unversioned
- Minor: Moved the "Delete message" menu option into a "Moderate" sub-menu. (#6100)
- Bugfix: Fixed the channel name input not being focused when opening the select-channel dialog. (#6096)
- Bugfix: Fixed inputs in dialogs not having a border around and padding in them. (#6098)
- Dev: Temporarily disable precompiled header support for macOS. (#6104)
+5 -1
View File
@@ -2578,7 +2578,11 @@ void ChannelView::addMessageContextMenuItems(QMenu *menu,
if (!layout->getMessage()->id.isEmpty() && twitchChannel &&
twitchChannel->hasModRights())
{
menu->addAction(
menu->addSeparator();
auto *moderateAction = menu->addAction("Mo&derate");
auto *moderateMenu = new QMenu(menu);
moderateAction->setMenu(moderateMenu);
moderateMenu->addAction(
"&Delete message", [twitchChannel, id = layout->getMessage()->id] {
twitchChannel->deleteMessagesAs(
id, getApp()->getAccounts()->twitch.getCurrent().get());