Skip to content

Commit

Permalink
fix: reuse one channel for emote search (#5946)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerixyz authored Feb 11, 2025
1 parent 2b118c9 commit b7e03ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
- Bugfix: Fixed the reply button showing for inline whispers and announcements. (#5863)
- Bugfix: Fixed suspicious user treatment update messages not being searchable. (#5865)
- Bugfix: Ensure miniaudio backend exits even if it doesn't exit cleanly. (#5896)
- Bugfix: Fixed search in emote popup not always working correctly. (#5946)
- Bugfix: Fixed channel point redemptions with messages not showing up if PubSub is disconnected. (#5948)
- Dev: Add initial experimental EventSub support. (#5837, #5895, #5897, #5904, #5910, #5903, #5915, #5916, #5930, #5935, #5932, #5943)
- Dev: Remove unneeded platform specifier for toasts. (#5914)
Expand Down
7 changes: 4 additions & 3 deletions src/widgets/dialogs/EmotePopup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down Expand Up @@ -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())
Expand All @@ -632,8 +635,6 @@ void EmotePopup::filterEmotes(const QString &searchText)
loadEmojis(*searchChannel, filteredEmojis, "Emojis");
}

this->searchView_->setChannel(searchChannel);

this->notebook_->hide();
this->searchView_->show();
}
Expand Down

0 comments on commit b7e03ad

Please sign in to comment.