fix: only hide messages from restricted users, not all suspicious users (#6049)
it's probably best to leave this setting solo'd out as restricted users so monitored users can get their own behaviour in their own setting later
This commit is contained in:
@@ -166,13 +166,12 @@ void MessageLayout::actuallyLayout(const MessageLayoutContext &ctx)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (this->message_->flags.hasAny(MessageFlag::RestrictedMessage,
|
||||
MessageFlag::MonitoredMessage))
|
||||
if (this->message_->flags.has(MessageFlag::RestrictedMessage))
|
||||
{
|
||||
if (getApp()->getStreamerMode()->shouldHideSuspiciousUsers())
|
||||
if (getApp()->getStreamerMode()->shouldHideRestrictedUsers())
|
||||
{
|
||||
// Message is being hidden because the source is a
|
||||
// restricted or monitored user
|
||||
// restricted user
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -362,8 +362,8 @@ public:
|
||||
"/streamerMode/hideViewerCountAndDuration", false};
|
||||
BoolSetting streamerModeHideModActions = {"/streamerMode/hideModActions",
|
||||
true};
|
||||
BoolSetting streamerModeHideSuspiciousUsers = {
|
||||
"/streamerMode/hideSuspiciousUsers",
|
||||
BoolSetting streamerModeHideRestrictedUsers = {
|
||||
"/streamerMode/hideRestrictedUsers",
|
||||
true,
|
||||
};
|
||||
BoolSetting streamerModeMuteMentions = {"/streamerMode/muteMentions", true};
|
||||
|
||||
@@ -207,9 +207,9 @@ bool StreamerMode::shouldHideModActions() const
|
||||
return getSettings()->streamerModeHideModActions && this->isEnabled();
|
||||
}
|
||||
|
||||
bool StreamerMode::shouldHideSuspiciousUsers() const
|
||||
bool StreamerMode::shouldHideRestrictedUsers() const
|
||||
{
|
||||
return getSettings()->streamerModeHideSuspiciousUsers && this->isEnabled();
|
||||
return getSettings()->streamerModeHideRestrictedUsers && this->isEnabled();
|
||||
}
|
||||
|
||||
void StreamerMode::start()
|
||||
|
||||
@@ -23,8 +23,8 @@ 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;
|
||||
/// Returns true if streamer mode is enabled & the settings to hide messages from restricted users is enabled
|
||||
[[nodiscard]] virtual bool shouldHideRestrictedUsers() const = 0;
|
||||
|
||||
virtual void start() = 0;
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
bool isEnabled() const override;
|
||||
|
||||
bool shouldHideModActions() const override;
|
||||
bool shouldHideSuspiciousUsers() const override;
|
||||
bool shouldHideRestrictedUsers() const override;
|
||||
|
||||
void start() override;
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ WindowManager::WindowManager(const Paths &paths, Settings &settings,
|
||||
this->forceLayoutChannelViewsListener.add(
|
||||
settings.streamerModeHideModActions);
|
||||
this->forceLayoutChannelViewsListener.add(
|
||||
settings.streamerModeHideSuspiciousUsers);
|
||||
settings.streamerModeHideRestrictedUsers);
|
||||
|
||||
this->layoutChannelViewsListener.add(settings.timestampFormat);
|
||||
this->layoutChannelViewsListener.add(fonts.fontChanged);
|
||||
|
||||
@@ -733,10 +733,10 @@ void GeneralPage::initLayout(GeneralPageView &layout)
|
||||
"Hide moderation actions", s.streamerModeHideModActions, false,
|
||||
"Hide bans, timeouts, and automod messages from appearing in chat.");
|
||||
|
||||
SettingWidget::checkbox("Hide messages from suspicious users",
|
||||
s.streamerModeHideSuspiciousUsers)
|
||||
->setTooltip("Suspicious users are users who are marked as either "
|
||||
"restricted or monitored by you or Twitch's AutoMod")
|
||||
SettingWidget::checkbox("Hide messages from restricted users",
|
||||
s.streamerModeHideRestrictedUsers)
|
||||
->setTooltip("Restricted users can be marked by you, your moderators, "
|
||||
"or Twitch's AutoMod")
|
||||
->addTo(layout);
|
||||
|
||||
layout.addCheckbox(
|
||||
|
||||
Reference in New Issue
Block a user