feat(emote-popup): automatically reload Twitch emotes (#5580)

This commit is contained in:
nerix
2024-09-01 13:44:36 +02:00
committed by GitHub
parent 820aa12af6
commit 61b04dbe7b
8 changed files with 79 additions and 15 deletions
+10
View File
@@ -897,6 +897,11 @@ ChannelPtr ChannelView::channel()
return this->channel_;
}
ChannelPtr ChannelView::underlyingChannel() const
{
return this->underlyingChannel_;
}
bool ChannelView::showScrollbarHighlights() const
{
return this->channel_->getType() != Channel::Type::TwitchMentions;
@@ -976,6 +981,11 @@ void ChannelView::setChannel(const ChannelPtr &underlyingChannel)
this->channel_->fillInMissingMessages(filtered);
});
this->channelConnections_.managedConnect(underlyingChannel->messagesCleared,
[this]() {
this->clearMessages();
});
// Copy over messages from the backing channel to the filtered one
// and the ui.
auto snapshot = underlyingChannel->getMessageSnapshot();