mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Reset the timer & refresh thumbnail when changing split channel (#2080)
This commit is contained in:
parent
48a3506d77
commit
39a0e69a3b
3 changed files with 21 additions and 2 deletions
|
@ -31,6 +31,7 @@
|
|||
- Bugfix: Fixed timestamps being incorrect on some messages loaded from the recent-messages service on startup (#1286, #2020)
|
||||
- Bugfix: Fixed timestamps missing on channel point redemption messages (#1943)
|
||||
- Bugfix: Fixed tooltip didn't show in `EmotePopup` depending on the `Link preview` setting enabled or no (#2008)
|
||||
- Bugfix: Fixed Stream thumbnail not updating after using the "Change channel" feature (#2074, #2080)
|
||||
|
||||
## 2.2.0
|
||||
|
||||
|
|
|
@ -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(); //
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,6 +48,13 @@ private:
|
|||
void initializeModeSignals(EffectLabel &label);
|
||||
std::unique_ptr<QMenu> createMainMenu();
|
||||
std::unique_ptr<QMenu> createChatModeMenu();
|
||||
|
||||
/**
|
||||
* @brief Reset the thumbnail data and timer so a new
|
||||
* thumbnail can be fetched
|
||||
**/
|
||||
void resetThumbnail();
|
||||
|
||||
void handleChannelChanged();
|
||||
|
||||
Split *const split_{};
|
||||
|
|
Loading…
Reference in a new issue