Hide inline whispers in streamer mode (#4076)

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
8thony 2022-10-22 12:04:51 +02:00 committed by GitHub
parent 457c5725da
commit 570746a8bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 2 deletions

View file

@ -30,6 +30,7 @@
- Minor: Added quotation marks in the permitted/blocked Automod messages for clarity. (#3654)
- Minor: Added Quick Switcher item to open a channel in a new popup window. (#3828)
- Minor: Added information about the user's operating system in the About page. (#3663)
- Minor: Added option to hide inline whispers in streamer mode (#4076)
- Minor: Adjusted large stream thumbnail to 16:9 (#3655)
- Minor: Prevented user from entering incorrect characters in Live Notifications channels list. (#3715, #3730)
- Minor: Sorted usernames in /vips message to be case-insensitive. (#3696)

View file

@ -26,6 +26,7 @@
#include "util/IncognitoBrowser.hpp"
#include "util/Qt.hpp"
#include "util/StreamLink.hpp"
#include "util/StreamerMode.hpp"
#include "util/Twitch.hpp"
#include "widgets/Window.hpp"
#include "widgets/dialogs/ReplyThreadPopup.hpp"
@ -171,7 +172,9 @@ bool appendWhisperMessageWordsLocally(const QStringList &words)
auto overrideFlags = boost::optional<MessageFlags>(messagexD->flags);
overrideFlags->set(MessageFlag::DoNotLog);
if (getSettings()->inlineWhispers)
if (getSettings()->inlineWhispers &&
!(getSettings()->streamerModeSuppressInlineWhispers &&
isInStreamerMode()))
{
app->twitch->forEachChannel(
[&messagexD, overrideFlags](ChannelPtr _channel) {

View file

@ -15,6 +15,7 @@
#include "util/FormatTime.hpp"
#include "util/Helpers.hpp"
#include "util/IrcHelpers.hpp"
#include "util/StreamerMode.hpp"
#include <IrcMessage>
@ -800,7 +801,9 @@ void IrcMessageHandler::handleWhisperMessage(Communi::IrcMessage *message)
overrideFlags->set(MessageFlag::DoNotTriggerNotification);
overrideFlags->set(MessageFlag::DoNotLog);
if (getSettings()->inlineWhispers)
if (getSettings()->inlineWhispers &&
!(getSettings()->streamerModeSuppressInlineWhispers &&
isInStreamerMode()))
{
getApp()->twitch->forEachChannel(
[&_message, overrideFlags](ChannelPtr channel) {

View file

@ -246,6 +246,8 @@ public:
BoolSetting streamerModeMuteMentions = {"/streamerMode/muteMentions", true};
BoolSetting streamerModeSuppressLiveNotifications = {
"/streamerMode/supressLiveNotifications", false};
BoolSetting streamerModeSuppressInlineWhispers = {
"/streamerMode/suppressInlineWhispers", true};
/// Ignored Phrases
QStringSetting ignoredPhraseReplace = {"/ignore/ignoredPhraseReplace",

View file

@ -413,6 +413,8 @@ void GeneralPage::initLayout(GeneralPageView &layout)
layout.addCheckbox("Mute mention sounds", s.streamerModeMuteMentions);
layout.addCheckbox("Suppress Live Notifications",
s.streamerModeSuppressLiveNotifications);
layout.addCheckbox("Suppress Inline Whispers",
s.streamerModeSuppressInlineWhispers);
layout.addTitle("Link Previews");
layout.addDescription(