option to hide viewer count and duration of the stream when you hover on the split (#1626)

Fixes #1621
This commit is contained in:
apa420 2020-04-13 12:24:27 +02:00 committed by GitHub
parent 3138efba25
commit 2ac0b60952
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 2 deletions

View file

@ -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",

View file

@ -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(

View file

@ -94,8 +94,11 @@ namespace {
.arg(s.game.toHtmlEscaped())
.arg(s.game.isEmpty() ? QString() : "<br>")
.arg(s.rerun ? "Vod-casting" : "Live")
.arg(s.uptime)
.arg(QString::number(s.viewerCount));
.arg(getSettings()->hideViewerCountAndDuration ? "&lt;Hidden&gt;"
: s.uptime)
.arg(getSettings()->hideViewerCountAndDuration
? "&lt;Hidden&gt;"
: QString::number(s.viewerCount));
}
auto formatOfflineTooltip(const TwitchChannel::StreamStatus &s)
{