Reset the timer & refresh thumbnail when changing split channel (#2080)

This commit is contained in:
pajlada
2020-10-18 12:19:30 +02:00
committed by GitHub
parent 48a3506d77
commit 39a0e69a3b
3 changed files with 21 additions and 2 deletions
+13 -2
View File
@@ -587,16 +587,27 @@ void SplitHeader::initializeModeSignals(EffectLabel &label)
});
}
void SplitHeader::resetThumbnail()
{
this->lastThumbnail_.invalidate();
this->thumbnail_.clear();
}
void SplitHeader::handleChannelChanged()
{
this->resetThumbnail();
this->updateChannelText();
this->channelConnections_.clear();
auto channel = this->split_->getChannel();
if (auto twitchChannel = dynamic_cast<TwitchChannel *>(channel.get()))
{
this->channelConnections_.emplace_back(
twitchChannel->liveStatusChanged.connect(
[this]() { this->updateChannelText(); }));
twitchChannel->liveStatusChanged.connect([this]() {
this->updateChannelText(); //
}));
}
}