Allow hiding moderation actions in streamer mode (#3926)

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
Mm2PL 2022-11-06 17:30:53 +01:00 committed by GitHub
parent c6a162c7ff
commit df4c294875
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 4 deletions

View file

@ -5,6 +5,7 @@
- Major: Added support for Twitch's Chat Replies. [Wiki Page](https://wiki.chatterino.com/Features/#message-replies) (#3722, #3989, #4041, #4047, #4055, #4067, #4077, #3905) - Major: Added support for Twitch's Chat Replies. [Wiki Page](https://wiki.chatterino.com/Features/#message-replies) (#3722, #3989, #4041, #4047, #4055, #4067, #4077, #3905)
- Major: Added multi-channel searching to search dialog via keyboard shortcut. (Ctrl+Shift+F by default) (#3694, #3875) - Major: Added multi-channel searching to search dialog via keyboard shortcut. (Ctrl+Shift+F by default) (#3694, #3875)
- Major: Added support for emotes and badges from [7TV](https://7tv.app). [Wiki Page](https://wiki.chatterino.com/Third_party_services/#7tv) (#4002, #4062) - Major: Added support for emotes and badges from [7TV](https://7tv.app). [Wiki Page](https://wiki.chatterino.com/Third_party_services/#7tv) (#4002, #4062)
- Minor: Allow hiding moderation actions in streamer mode. (#3926)
- Minor: Added highlights for `Elevated Messages`. (#4016) - Minor: Added highlights for `Elevated Messages`. (#4016)
- Minor: Removed total views from the usercard, as Twitch no longer updates the number. (#3792) - Minor: Removed total views from the usercard, as Twitch no longer updates the number. (#3792)
- Minor: Load missing messages from Recent Messages API upon reconnecting (#3878, #3932) - Minor: Load missing messages from Recent Messages API upon reconnecting (#3878, #3932)

View file

@ -10,6 +10,7 @@
#include "singletons/Theme.hpp" #include "singletons/Theme.hpp"
#include "singletons/WindowManager.hpp" #include "singletons/WindowManager.hpp"
#include "util/DebugCount.hpp" #include "util/DebugCount.hpp"
#include "util/StreamerMode.hpp"
#include <QApplication> #include <QApplication>
#include <QDebug> #include <QDebug>
@ -148,11 +149,17 @@ void MessageLayout::actuallyLayout(int width, MessageElementFlags flags)
continue; continue;
} }
if (hideModerationActions && if (this->message_->flags.has(MessageFlag::Timeout) ||
(this->message_->flags.has(MessageFlag::Timeout) || this->message_->flags.has(MessageFlag::Untimeout))
this->message_->flags.has(MessageFlag::Untimeout)))
{ {
continue; // This condition has been set up to execute isInStreamerMode() as the last thing
// as it could end up being expensive.
if (hideModerationActions ||
(getSettings()->streamerModeHideModActions &&
isInStreamerMode()))
{
continue;
}
} }
if (hideSimilar && this->message_->flags.has(MessageFlag::Similar)) if (hideSimilar && this->message_->flags.has(MessageFlag::Similar))

View file

@ -242,6 +242,8 @@ public:
"/streamerMode/hideLinkThumbnails", true}; "/streamerMode/hideLinkThumbnails", true};
BoolSetting streamerModeHideViewerCountAndDuration = { BoolSetting streamerModeHideViewerCountAndDuration = {
"/streamerMode/hideViewerCountAndDuration", false}; "/streamerMode/hideViewerCountAndDuration", false};
BoolSetting streamerModeHideModActions = {"/streamerMode/hideModActions",
true};
BoolSetting streamerModeMuteMentions = {"/streamerMode/muteMentions", true}; BoolSetting streamerModeMuteMentions = {"/streamerMode/muteMentions", true};
BoolSetting streamerModeSuppressLiveNotifications = { BoolSetting streamerModeSuppressLiveNotifications = {
"/streamerMode/supressLiveNotifications", false}; "/streamerMode/supressLiveNotifications", false};

View file

@ -416,6 +416,7 @@ void GeneralPage::initLayout(GeneralPageView &layout)
layout.addCheckbox( layout.addCheckbox(
"Hide viewer count and stream length while hovering over split header", "Hide viewer count and stream length while hovering over split header",
s.streamerModeHideViewerCountAndDuration); s.streamerModeHideViewerCountAndDuration);
layout.addCheckbox("Hide moderation actions", s.streamerModeHideModActions);
layout.addCheckbox("Mute mention sounds", s.streamerModeMuteMentions); layout.addCheckbox("Mute mention sounds", s.streamerModeMuteMentions);
layout.addCheckbox("Suppress Live Notifications", layout.addCheckbox("Suppress Live Notifications",
s.streamerModeSuppressLiveNotifications); s.streamerModeSuppressLiveNotifications);