Add input completion test suite (#4644)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -188,7 +188,7 @@ void FfzEmotes::loadEmotes()
|
||||
{
|
||||
if (!Settings::instance().enableFFZGlobalEmotes)
|
||||
{
|
||||
this->global_.set(EMPTY_EMOTE_MAP);
|
||||
this->setEmotes(EMPTY_EMOTE_MAP);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -199,13 +199,18 @@ void FfzEmotes::loadEmotes()
|
||||
.timeout(30000)
|
||||
.onSuccess([this](auto result) -> Outcome {
|
||||
auto parsedSet = parseGlobalEmotes(result.parseJson());
|
||||
this->global_.set(std::make_shared<EmoteMap>(std::move(parsedSet)));
|
||||
this->setEmotes(std::make_shared<EmoteMap>(std::move(parsedSet)));
|
||||
|
||||
return Success;
|
||||
})
|
||||
.execute();
|
||||
}
|
||||
|
||||
void FfzEmotes::setEmotes(std::shared_ptr<const EmoteMap> emotes)
|
||||
{
|
||||
this->global_.set(std::move(emotes));
|
||||
}
|
||||
|
||||
void FfzEmotes::loadChannel(
|
||||
std::weak_ptr<Channel> channel, const QString &channelID,
|
||||
std::function<void(EmoteMap &&)> emoteCallback,
|
||||
|
||||
@@ -22,6 +22,7 @@ public:
|
||||
std::shared_ptr<const EmoteMap> emotes() const;
|
||||
boost::optional<EmotePtr> emote(const EmoteName &name) const;
|
||||
void loadEmotes();
|
||||
void setEmotes(std::shared_ptr<const EmoteMap> emotes);
|
||||
static void loadChannel(
|
||||
std::weak_ptr<Channel> channel, const QString &channelId,
|
||||
std::function<void(EmoteMap &&)> emoteCallback,
|
||||
|
||||
Reference in New Issue
Block a user