diff --git a/src/widgets/splits/SplitHeader.cpp b/src/widgets/splits/SplitHeader.cpp index d77118ebe..7a3bb5d62 100644 --- a/src/widgets/splits/SplitHeader.cpp +++ b/src/widgets/splits/SplitHeader.cpp @@ -77,20 +77,15 @@ namespace { } auto formatTooltip(const TwitchChannel::StreamStatus &s) { - return QStringList{"", - "

", - s.title.toHtmlEscaped(), - "

", - s.game.toHtmlEscaped(), - "
", - s.rerun ? "Vod-casting" : "Live", - " for ", - s.uptime, - " with ", - QString::number(s.viewerCount), - " viewers", - "

"} - .join(""); + return QString(" \ +

%1%2%3%4%5 for %6 with %7 viewers

") + .arg(s.title.toHtmlEscaped()) + .arg(s.title.isEmpty() ? QString() : "

") + .arg(s.game.toHtmlEscaped()) + .arg(s.game.isEmpty() ? QString() : "
") + .arg(s.rerun ? "Vod-casting" : "Live") + .arg(s.uptime) + .arg(QString::number(s.viewerCount)); } auto formatTitle(const TwitchChannel::StreamStatus &s, Settings &settings) { @@ -109,9 +104,9 @@ namespace { title += " - " + s.uptime; if (settings.headerViewerCount) title += " - " + QString::number(s.viewerCount); - if (settings.headerGame) + if (settings.headerGame && !s.game.isEmpty()) title += " - " + s.game; - if (settings.headerStreamTitle) + if (settings.headerStreamTitle && !s.title.isEmpty()) title += " - " + s.title; return title;