mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Fixed live status not updating when channel is online. (#319)
* Fixed live status not updating when channel is online.
This commit is contained in:
parent
10f0aadb6c
commit
2b3fa06539
|
@ -184,15 +184,14 @@ void TwitchChannel::setLive(bool newLiveStatus)
|
|||
{
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(this->streamStatusMutex);
|
||||
if (this->streamStatus.live == newLiveStatus) {
|
||||
// Nothing changed
|
||||
return;
|
||||
if (this->streamStatus.live != newLiveStatus) {
|
||||
this->streamStatus.live = newLiveStatus;
|
||||
}
|
||||
|
||||
this->streamStatus.live = newLiveStatus;
|
||||
}
|
||||
|
||||
this->onlineStatusChanged.invoke();
|
||||
if (newLiveStatus) {
|
||||
this->updateLiveInfo.invoke();
|
||||
}
|
||||
}
|
||||
|
||||
void TwitchChannel::refreshLiveStatus()
|
||||
|
|
|
@ -54,7 +54,7 @@ public:
|
|||
|
||||
void setRoomID(const QString &_roomID);
|
||||
pajlada::Signals::NoArgSignal roomIDchanged;
|
||||
pajlada::Signals::NoArgSignal onlineStatusChanged;
|
||||
pajlada::Signals::NoArgSignal updateLiveInfo;
|
||||
|
||||
pajlada::Signals::NoArgBoltSignal fetchMessages;
|
||||
pajlada::Signals::NoArgSignal userStateChanged;
|
||||
|
|
|
@ -136,7 +136,7 @@ void SplitHeader::initializeChannelSignals()
|
|||
TwitchChannel *twitchChannel = dynamic_cast<TwitchChannel *>(channel.get());
|
||||
|
||||
if (twitchChannel) {
|
||||
twitchChannel->onlineStatusChanged.connect([this]() {
|
||||
twitchChannel->updateLiveInfo.connect([this]() {
|
||||
this->updateChannelText(); //
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue