From 992ea88884052058c709986e199fa23ebac2b8a9 Mon Sep 17 00:00:00 2001 From: pajlada Date: Sat, 20 Apr 2024 11:14:23 +0200 Subject: [PATCH] fix: Remove "Show chatter list" entry from split header menu for non-mods (#5336) --- CHANGELOG.md | 1 + src/widgets/splits/SplitHeader.cpp | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c19a0de8..f76498cc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - Bugfix: Fixed links having `http://` added to the beginning in certain cases. (#5323) - Bugfix: Fixed topmost windows from losing their status after opening dialogs on Windows. (#5330) - Bugfix: Fixed a gap appearing when using filters on `/watching`. (#5329) +- Bugfix: Removed the remnant "Show chatter list" menu entry for non-moderators. (#5336) - Dev: Changed the order of the query parameters for Twitch player URLs. (#5326) ## 2.5.0-beta.1 diff --git a/src/widgets/splits/SplitHeader.cpp b/src/widgets/splits/SplitHeader.cpp index ed4a59b18..6b7021798 100644 --- a/src/widgets/splits/SplitHeader.cpp +++ b/src/widgets/splits/SplitHeader.cpp @@ -525,9 +525,12 @@ std::unique_ptr SplitHeader::createMainMenu() if (twitchChannel) { - moreMenu->addAction( - "Show chatter list", this->split_, &Split::showChatterList, - h->getDisplaySequence(HotkeyCategory::Split, "openViewerList")); + if (twitchChannel->hasModRights()) + { + moreMenu->addAction( + "Show chatter list", this->split_, &Split::showChatterList, + h->getDisplaySequence(HotkeyCategory::Split, "openViewerList")); + } moreMenu->addAction("Subscribe", this->split_, &Split::openSubPage);