mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Fixed live status (#112)
* Fixed live status. * Update chatwidgetheader.cpp
This commit is contained in:
parent
38d118c5dc
commit
8bd3cd4060
|
@ -85,19 +85,17 @@ void ChatWidgetHeader::updateChannelText()
|
|||
auto channel = this->chatWidget->getChannel();
|
||||
|
||||
twitch::TwitchChannel *twitchChannel = dynamic_cast<twitch::TwitchChannel *>(channel.get());
|
||||
|
||||
if (channel->isEmpty()) {
|
||||
|
||||
if (twitchChannel != nullptr && twitchChannel->isLive) {
|
||||
this->channelNameLabel.setText(QString::fromStdString(channelName) + " (live)");
|
||||
if (twitchChannel != nullptr) {
|
||||
this->setToolTip("<style>.center { text-align: center; }</style>"
|
||||
"<p class = \"center\">" +
|
||||
twitchChannel->streamStatus + "<br><br>" +
|
||||
twitchChannel->streamGame + "<br>"
|
||||
"Live for " +
|
||||
twitchChannel->streamUptime + " with " +
|
||||
twitchChannel->streamViewerCount + " viewers"
|
||||
"</p>");
|
||||
}
|
||||
this->setToolTip("<style>.center { text-align: center; }</style>"
|
||||
"<p class = \"center\">" +
|
||||
twitchChannel->streamStatus + "<br><br>" +
|
||||
twitchChannel->streamGame + "<br>"
|
||||
"Live for " +
|
||||
twitchChannel->streamUptime + " with " +
|
||||
twitchChannel->streamViewerCount + " viewers"
|
||||
"</p>");
|
||||
} else {
|
||||
this->channelNameLabel.setText(QString::fromStdString(channelName));
|
||||
this->setToolTip("");
|
||||
|
|
Loading…
Reference in a new issue