feat: Hide messages from suspicious users in streamer mode (#6042)
This is a setting that's enabled by default and can be disabled under the "Streamer mode" sub-category in the settings dialog
This commit is contained in:
@@ -346,6 +346,12 @@ public:
|
||||
BoolSetting lowercaseDomains = {"/links/linkLowercase", true};
|
||||
|
||||
/// Streamer Mode
|
||||
// TODO: Should these settings be converted to booleans that live outside of
|
||||
// streamer mode?
|
||||
// Something like:
|
||||
// - "Hide when streamer mode is enabled"
|
||||
// - "Always hide"
|
||||
// - "Don't hide"
|
||||
EnumSetting<StreamerModeSetting> enableStreamerMode = {
|
||||
"/streamerMode/enabled", StreamerModeSetting::DetectStreamingSoftware};
|
||||
BoolSetting streamerModeHideUsercardAvatars = {
|
||||
@@ -356,6 +362,10 @@ public:
|
||||
"/streamerMode/hideViewerCountAndDuration", false};
|
||||
BoolSetting streamerModeHideModActions = {"/streamerMode/hideModActions",
|
||||
true};
|
||||
BoolSetting streamerModeHideSuspiciousUsers = {
|
||||
"/streamerMode/hideSuspiciousUsers",
|
||||
true,
|
||||
};
|
||||
BoolSetting streamerModeMuteMentions = {"/streamerMode/muteMentions", true};
|
||||
BoolSetting streamerModeSuppressLiveNotifications = {
|
||||
"/streamerMode/supressLiveNotifications", false};
|
||||
|
||||
@@ -207,6 +207,11 @@ bool StreamerMode::shouldHideModActions() const
|
||||
return getSettings()->streamerModeHideModActions && this->isEnabled();
|
||||
}
|
||||
|
||||
bool StreamerMode::shouldHideSuspiciousUsers() const
|
||||
{
|
||||
return getSettings()->streamerModeHideSuspiciousUsers && this->isEnabled();
|
||||
}
|
||||
|
||||
void StreamerMode::start()
|
||||
{
|
||||
this->private_->start();
|
||||
|
||||
@@ -23,6 +23,9 @@ public:
|
||||
/// Returns true if streamer mode is enabled & the settings to hide mod actions is enabled
|
||||
[[nodiscard]] virtual bool shouldHideModActions() const = 0;
|
||||
|
||||
/// Returns true if streamer mode is enabled & the settings to hide messages from suspicious users is enabled
|
||||
[[nodiscard]] virtual bool shouldHideSuspiciousUsers() const = 0;
|
||||
|
||||
virtual void start() = 0;
|
||||
|
||||
Q_SIGNALS:
|
||||
@@ -43,6 +46,7 @@ public:
|
||||
bool isEnabled() const override;
|
||||
|
||||
bool shouldHideModActions() const override;
|
||||
bool shouldHideSuspiciousUsers() const override;
|
||||
|
||||
void start() override;
|
||||
|
||||
|
||||
@@ -147,6 +147,8 @@ WindowManager::WindowManager(const Paths &paths, Settings &settings,
|
||||
this->forceLayoutChannelViewsListener.add(settings.hideModerated);
|
||||
this->forceLayoutChannelViewsListener.add(
|
||||
settings.streamerModeHideModActions);
|
||||
this->forceLayoutChannelViewsListener.add(
|
||||
settings.streamerModeHideSuspiciousUsers);
|
||||
|
||||
this->layoutChannelViewsListener.add(settings.timestampFormat);
|
||||
this->layoutChannelViewsListener.add(fonts.fontChanged);
|
||||
|
||||
Reference in New Issue
Block a user