diff --git a/src/providers/twitch/twitchchannel.cpp b/src/providers/twitch/twitchchannel.cpp index 729612d49..d47b7f667 100644 --- a/src/providers/twitch/twitchchannel.cpp +++ b/src/providers/twitch/twitchchannel.cpp @@ -184,15 +184,14 @@ void TwitchChannel::setLive(bool newLiveStatus) { { std::lock_guard 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() diff --git a/src/providers/twitch/twitchchannel.hpp b/src/providers/twitch/twitchchannel.hpp index 718b7b3cb..9ba0ae0f0 100644 --- a/src/providers/twitch/twitchchannel.hpp +++ b/src/providers/twitch/twitchchannel.hpp @@ -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; diff --git a/src/widgets/helper/splitheader.cpp b/src/widgets/helper/splitheader.cpp index b6c198ab1..77ccd8d70 100644 --- a/src/widgets/helper/splitheader.cpp +++ b/src/widgets/helper/splitheader.cpp @@ -136,7 +136,7 @@ void SplitHeader::initializeChannelSignals() TwitchChannel *twitchChannel = dynamic_cast(channel.get()); if (twitchChannel) { - twitchChannel->onlineStatusChanged.connect([this]() { + twitchChannel->updateLiveInfo.connect([this]() { this->updateChannelText(); // }); }