Fixed live status (#112)
* Fixed live status. * Update chatwidgetheader.cpp
This commit is contained in:
@@ -86,9 +86,8 @@ void ChatWidgetHeader::updateChannelText()
|
|||||||
|
|
||||||
twitch::TwitchChannel *twitchChannel = dynamic_cast<twitch::TwitchChannel *>(channel.get());
|
twitch::TwitchChannel *twitchChannel = dynamic_cast<twitch::TwitchChannel *>(channel.get());
|
||||||
|
|
||||||
if (channel->isEmpty()) {
|
if (twitchChannel != nullptr && twitchChannel->isLive) {
|
||||||
this->channelNameLabel.setText(QString::fromStdString(channelName) + " (live)");
|
this->channelNameLabel.setText(QString::fromStdString(channelName) + " (live)");
|
||||||
if (twitchChannel != nullptr) {
|
|
||||||
this->setToolTip("<style>.center { text-align: center; }</style>"
|
this->setToolTip("<style>.center { text-align: center; }</style>"
|
||||||
"<p class = \"center\">" +
|
"<p class = \"center\">" +
|
||||||
twitchChannel->streamStatus + "<br><br>" +
|
twitchChannel->streamStatus + "<br><br>" +
|
||||||
@@ -97,7 +96,6 @@ void ChatWidgetHeader::updateChannelText()
|
|||||||
twitchChannel->streamUptime + " with " +
|
twitchChannel->streamUptime + " with " +
|
||||||
twitchChannel->streamViewerCount + " viewers"
|
twitchChannel->streamViewerCount + " viewers"
|
||||||
"</p>");
|
"</p>");
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this->channelNameLabel.setText(QString::fromStdString(channelName));
|
this->channelNameLabel.setText(QString::fromStdString(channelName));
|
||||||
this->setToolTip("");
|
this->setToolTip("");
|
||||||
|
|||||||
Reference in New Issue
Block a user