Add input completion test suite (#4644)

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
Daniel Sage
2023-05-21 06:10:49 -04:00
committed by GitHub
parent e9f300b765
commit 51f2c4d1c0
24 changed files with 514 additions and 63 deletions
+8 -2
View File
@@ -275,7 +275,7 @@ void SeventvEmotes::loadGlobalEmotes()
{
if (!Settings::instance().enableSevenTVGlobalEmotes)
{
this->global_.set(EMPTY_EMOTE_MAP);
this->setGlobalEmotes(EMPTY_EMOTE_MAP);
return;
}
@@ -289,7 +289,8 @@ void SeventvEmotes::loadGlobalEmotes()
auto emoteMap = parseEmotes(parsedEmotes, true);
qCDebug(chatterinoSeventv)
<< "Loaded" << emoteMap.size() << "7TV Global Emotes";
this->global_.set(std::make_shared<EmoteMap>(std::move(emoteMap)));
this->setGlobalEmotes(
std::make_shared<EmoteMap>(std::move(emoteMap)));
return Success;
})
@@ -300,6 +301,11 @@ void SeventvEmotes::loadGlobalEmotes()
.execute();
}
void SeventvEmotes::setGlobalEmotes(std::shared_ptr<const EmoteMap> emotes)
{
this->global_.set(std::move(emotes));
}
void SeventvEmotes::loadChannelEmotes(
const std::weak_ptr<Channel> &channel, const QString &channelId,
std::function<void(EmoteMap &&, ChannelInfo)> callback, bool manualRefresh)