mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Fix channels not going offline properly
This commit is contained in:
parent
d0a6974827
commit
0b18a8331a
1 changed files with 3 additions and 1 deletions
|
@ -181,14 +181,16 @@ void TwitchChannel::addRecentChatter(const std::shared_ptr<messages::Message> &m
|
|||
|
||||
void TwitchChannel::setLive(bool newLiveStatus)
|
||||
{
|
||||
bool gotNewLiveStatus = false;
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(this->streamStatusMutex);
|
||||
if (this->streamStatus.live != newLiveStatus) {
|
||||
gotNewLiveStatus = true;
|
||||
this->streamStatus.live = newLiveStatus;
|
||||
}
|
||||
}
|
||||
|
||||
if (newLiveStatus) {
|
||||
if (gotNewLiveStatus) {
|
||||
this->updateLiveInfo.invoke();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue