diff --git a/src/singletons/Settings.hpp b/src/singletons/Settings.hpp index 7ae1984bc..c95b0e500 100644 --- a/src/singletons/Settings.hpp +++ b/src/singletons/Settings.hpp @@ -278,6 +278,8 @@ public: BoolSetting restartOnCrash = {"/misc/restartOnCrash", false}; BoolSetting attachExtensionToAnyProcess = { "/misc/attachExtensionToAnyProcess", false}; + BoolSetting hideViewerCountAndDuration = { + "/misc/hideViewerCountAndDuration", false}; /// Debug BoolSetting showUnhandledIrcMessages = {"/debug/showUnhandledIrcMessages", diff --git a/src/widgets/settingspages/GeneralPage.cpp b/src/widgets/settingspages/GeneralPage.cpp index 03d8c8c9f..7c4acf998 100644 --- a/src/widgets/settingspages/GeneralPage.cpp +++ b/src/widgets/settingspages/GeneralPage.cpp @@ -540,6 +540,9 @@ void GeneralPage::initLayout(SettingsLayout &layout) s.enableExperimentalIrc); layout.addCheckbox("Show unhandled IRC messages", s.showUnhandledIrcMessages); + layout.addCheckbox( + "Hide viewercount and stream length while hovering the split", + s.hideViewerCountAndDuration); layout.addTitle("Cache"); layout.addDescription( diff --git a/src/widgets/splits/SplitHeader.cpp b/src/widgets/splits/SplitHeader.cpp index 2ca47effc..55ec556e8 100644 --- a/src/widgets/splits/SplitHeader.cpp +++ b/src/widgets/splits/SplitHeader.cpp @@ -94,8 +94,11 @@ namespace { .arg(s.game.toHtmlEscaped()) .arg(s.game.isEmpty() ? QString() : "
") .arg(s.rerun ? "Vod-casting" : "Live") - .arg(s.uptime) - .arg(QString::number(s.viewerCount)); + .arg(getSettings()->hideViewerCountAndDuration ? "<Hidden>" + : s.uptime) + .arg(getSettings()->hideViewerCountAndDuration + ? "<Hidden>" + : QString::number(s.viewerCount)); } auto formatOfflineTooltip(const TwitchChannel::StreamStatus &s) {