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
+12
View File
@@ -197,6 +197,12 @@ void TwitchChannel::setLocalizedName(const QString &name)
void TwitchChannel::refreshBTTVChannelEmotes(bool manualRefresh)
{
if (!Settings::instance().enableBTTVChannelEmotes)
{
this->bttvEmotes_.set(EMPTY_EMOTE_MAP);
return;
}
BttvEmotes::loadChannel(
weakOf<Channel>(this), this->roomId(), this->getLocalizedName(),
[this, weak = weakOf<Channel>(this)](auto &&emoteMap) {
@@ -209,6 +215,12 @@ void TwitchChannel::refreshBTTVChannelEmotes(bool manualRefresh)
void TwitchChannel::refreshFFZChannelEmotes(bool manualRefresh)
{
if (!Settings::instance().enableFFZChannelEmotes)
{
this->ffzEmotes_.set(EMPTY_EMOTE_MAP);
return;
}
FfzEmotes::loadChannel(
weakOf<Channel>(this), this->roomId(),
[this, weak = weakOf<Channel>(this)](auto &&emoteMap) {