fix: Fix searching in emote popup if not in a twitch channel (#6357)
Co-authored-by: ScrubN <72096833+ScrubN@users.noreply.github.com>
This commit is contained in:
@@ -49,6 +49,7 @@
|
|||||||
- Bugfix: Fixed eventsub message delete notifications not being affected by "Show deletions of single messages". (#6233)
|
- Bugfix: Fixed eventsub message delete notifications not being affected by "Show deletions of single messages". (#6233)
|
||||||
- Bugfix: Don't add reply buttons to messages that are invalid reply targets. (#6119)
|
- Bugfix: Don't add reply buttons to messages that are invalid reply targets. (#6119)
|
||||||
- Bugfix: Fixed invalid commands from being forwarded to Helix, making it possible for information to leak (e.g. if you typed `/bann username ban reason` it would be seen by others in chat as `username ban reason`). (#6272, #6330)
|
- Bugfix: Fixed invalid commands from being forwarded to Helix, making it possible for information to leak (e.g. if you typed `/bann username ban reason` it would be seen by others in chat as `username ban reason`). (#6272, #6330)
|
||||||
|
- Bugfix: Fixed a crash that occurs when searching for emotes in channel-less contexts. (#6357)
|
||||||
- Dev: Mini refactor of Split. (#6148)
|
- Dev: Mini refactor of Split. (#6148)
|
||||||
- Dev: Conan will no longer generate a `CMakeUserPresets.json` file. (#6117)
|
- Dev: Conan will no longer generate a `CMakeUserPresets.json` file. (#6117)
|
||||||
- Dev: Pass `--force-openssl` when installing from CMake in Qt 6.8+. (#6129)
|
- Dev: Pass `--force-openssl` when installing from CMake in Qt 6.8+. (#6129)
|
||||||
|
|||||||
@@ -422,11 +422,6 @@ void EmotePopup::loadChannel(ChannelPtr channel)
|
|||||||
|
|
||||||
this->setWindowTitle("Emotes in #" + this->channel_->getName());
|
this->setWindowTitle("Emotes in #" + this->channel_->getName());
|
||||||
|
|
||||||
if (this->twitchChannel_ == nullptr)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this->globalEmotesView_->setChannel(
|
this->globalEmotesView_->setChannel(
|
||||||
std::make_shared<Channel>("", Channel::Type::None));
|
std::make_shared<Channel>("", Channel::Type::None));
|
||||||
this->subEmotesView_->setChannel(
|
this->subEmotesView_->setChannel(
|
||||||
@@ -441,11 +436,6 @@ void EmotePopup::loadChannel(ChannelPtr channel)
|
|||||||
|
|
||||||
void EmotePopup::reloadEmotes()
|
void EmotePopup::reloadEmotes()
|
||||||
{
|
{
|
||||||
if (this->twitchChannel_ == nullptr)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto subChannel = this->subEmotesView_->underlyingChannel();
|
auto subChannel = this->subEmotesView_->underlyingChannel();
|
||||||
auto globalChannel = this->globalEmotesView_->underlyingChannel();
|
auto globalChannel = this->globalEmotesView_->underlyingChannel();
|
||||||
auto channelChannel = this->channelEmotesView_->underlyingChannel();
|
auto channelChannel = this->channelEmotesView_->underlyingChannel();
|
||||||
@@ -454,13 +444,32 @@ void EmotePopup::reloadEmotes()
|
|||||||
globalChannel->clearMessages();
|
globalChannel->clearMessages();
|
||||||
channelChannel->clearMessages();
|
channelChannel->clearMessages();
|
||||||
|
|
||||||
// twitch
|
if (this->twitchChannel_)
|
||||||
addTwitchEmoteSets(
|
{
|
||||||
twitchChannel_->localTwitchEmotes(),
|
// twitch
|
||||||
*getApp()->getAccounts()->twitch.getCurrent()->accessEmoteSets(),
|
addTwitchEmoteSets(
|
||||||
*globalChannel, *subChannel, twitchChannel_->roomId(),
|
twitchChannel_->localTwitchEmotes(),
|
||||||
twitchChannel_->getName());
|
*getApp()->getAccounts()->twitch.getCurrent()->accessEmoteSets(),
|
||||||
|
*globalChannel, *subChannel, twitchChannel_->roomId(),
|
||||||
|
twitchChannel_->getName());
|
||||||
|
|
||||||
|
// channel
|
||||||
|
if (Settings::instance().enableBTTVChannelEmotes)
|
||||||
|
{
|
||||||
|
addEmotes(*channelChannel, *this->twitchChannel_->bttvEmotes(),
|
||||||
|
"BetterTTV", MessageElementFlag::BttvEmote);
|
||||||
|
}
|
||||||
|
if (Settings::instance().enableFFZChannelEmotes)
|
||||||
|
{
|
||||||
|
addEmotes(*channelChannel, *this->twitchChannel_->ffzEmotes(),
|
||||||
|
"FrankerFaceZ", MessageElementFlag::FfzEmote);
|
||||||
|
}
|
||||||
|
if (Settings::instance().enableSevenTVChannelEmotes)
|
||||||
|
{
|
||||||
|
addEmotes(*channelChannel, *this->twitchChannel_->seventvEmotes(),
|
||||||
|
"7TV", MessageElementFlag::SevenTVEmote);
|
||||||
|
}
|
||||||
|
}
|
||||||
// global
|
// global
|
||||||
if (Settings::instance().enableBTTVGlobalEmotes)
|
if (Settings::instance().enableBTTVGlobalEmotes)
|
||||||
{
|
{
|
||||||
@@ -478,23 +487,6 @@ void EmotePopup::reloadEmotes()
|
|||||||
"7TV", MessageElementFlag::SevenTVEmote);
|
"7TV", MessageElementFlag::SevenTVEmote);
|
||||||
}
|
}
|
||||||
|
|
||||||
// channel
|
|
||||||
if (Settings::instance().enableBTTVChannelEmotes)
|
|
||||||
{
|
|
||||||
addEmotes(*channelChannel, *this->twitchChannel_->bttvEmotes(),
|
|
||||||
"BetterTTV", MessageElementFlag::BttvEmote);
|
|
||||||
}
|
|
||||||
if (Settings::instance().enableFFZChannelEmotes)
|
|
||||||
{
|
|
||||||
addEmotes(*channelChannel, *this->twitchChannel_->ffzEmotes(),
|
|
||||||
"FrankerFaceZ", MessageElementFlag::FfzEmote);
|
|
||||||
}
|
|
||||||
if (Settings::instance().enableSevenTVChannelEmotes)
|
|
||||||
{
|
|
||||||
addEmotes(*channelChannel, *this->twitchChannel_->seventvEmotes(),
|
|
||||||
"7TV", MessageElementFlag::SevenTVEmote);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (subChannel->getMessageSnapshot().size() == 0)
|
if (subChannel->getMessageSnapshot().size() == 0)
|
||||||
{
|
{
|
||||||
MessageBuilder builder;
|
MessageBuilder builder;
|
||||||
|
|||||||
Reference in New Issue
Block a user