feat: add settings to toggle BTTV/FFZ global/channel emotes (#3935)

* feat: add settings to disable BTTV/FFZ global/channel emotes

* docs: add changelog entry

* fix: capitalize `BTTV` and `FFZ`

* fix: rename and move settings
This commit is contained in:
nerix
2022-08-28 12:20:47 +02:00
committed by GitHub
parent 33db006635
commit c1af2c3faa
11 changed files with 108 additions and 10 deletions
+7
View File
@@ -11,6 +11,7 @@
#include "messages/ImageSet.hpp"
#include "messages/MessageBuilder.hpp"
#include "providers/twitch/TwitchChannel.hpp"
#include "singletons/Settings.hpp"
namespace chatterino {
namespace {
@@ -141,6 +142,12 @@ boost::optional<EmotePtr> BttvEmotes::emote(const EmoteName &name) const
void BttvEmotes::loadEmotes()
{
if (!Settings::instance().enableBTTVGlobalEmotes)
{
this->global_.set(EMPTY_EMOTE_MAP);
return;
}
NetworkRequest(QString(globalEmoteApiUrl))
.timeout(30000)
.onSuccess([this](auto result) -> Outcome {