fix: reuse one channel for emote search (#5946)

This commit is contained in:
nerix
2025-02-11 09:49:20 +01:00
committed by GitHub
parent 2b118c9aa2
commit b7e03adc21
2 changed files with 5 additions and 3 deletions
+4 -3
View File
@@ -430,6 +430,8 @@ void EmotePopup::loadChannel(ChannelPtr channel)
std::make_shared<Channel>("", Channel::Type::None));
this->channelEmotesView_->setChannel(
std::make_shared<Channel>("", Channel::Type::None));
this->searchView_->setChannel(
std::make_shared<Channel>("", Channel::Type::None));
this->reloadEmotes();
}
@@ -606,7 +608,8 @@ void EmotePopup::filterEmotes(const QString &searchText)
return;
}
auto searchChannel = std::make_shared<Channel>("", Channel::Type::None);
auto searchChannel = this->searchView_->underlyingChannel();
searchChannel->clearMessages();
// true in special channels like /mentions
if (this->channel_->isTwitchChannel())
@@ -632,8 +635,6 @@ void EmotePopup::filterEmotes(const QString &searchText)
loadEmojis(*searchChannel, filteredEmojis, "Emojis");
}
this->searchView_->setChannel(searchChannel);
this->notebook_->hide();
this->searchView_->show();
}