Allow hiding moderation actions in streamer mode (#3926)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "singletons/Theme.hpp"
|
||||
#include "singletons/WindowManager.hpp"
|
||||
#include "util/DebugCount.hpp"
|
||||
#include "util/StreamerMode.hpp"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
@@ -148,11 +149,17 @@ void MessageLayout::actuallyLayout(int width, MessageElementFlags flags)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (hideModerationActions &&
|
||||
(this->message_->flags.has(MessageFlag::Timeout) ||
|
||||
this->message_->flags.has(MessageFlag::Untimeout)))
|
||||
if (this->message_->flags.has(MessageFlag::Timeout) ||
|
||||
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))
|
||||
|
||||
@@ -242,6 +242,8 @@ public:
|
||||
"/streamerMode/hideLinkThumbnails", true};
|
||||
BoolSetting streamerModeHideViewerCountAndDuration = {
|
||||
"/streamerMode/hideViewerCountAndDuration", false};
|
||||
BoolSetting streamerModeHideModActions = {"/streamerMode/hideModActions",
|
||||
true};
|
||||
BoolSetting streamerModeMuteMentions = {"/streamerMode/muteMentions", true};
|
||||
BoolSetting streamerModeSuppressLiveNotifications = {
|
||||
"/streamerMode/supressLiveNotifications", false};
|
||||
|
||||
@@ -416,6 +416,7 @@ void GeneralPage::initLayout(GeneralPageView &layout)
|
||||
layout.addCheckbox(
|
||||
"Hide viewer count and stream length while hovering over split header",
|
||||
s.streamerModeHideViewerCountAndDuration);
|
||||
layout.addCheckbox("Hide moderation actions", s.streamerModeHideModActions);
|
||||
layout.addCheckbox("Mute mention sounds", s.streamerModeMuteMentions);
|
||||
layout.addCheckbox("Suppress Live Notifications",
|
||||
s.streamerModeSuppressLiveNotifications);
|
||||
|
||||
Reference in New Issue
Block a user