feat: Add 7TV Emotes and Badges (#4002)

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
nerix
2022-10-16 13:22:17 +02:00
committed by GitHub
parent e8fd49aadb
commit 3e41b84ed7
29 changed files with 780 additions and 7 deletions
+10 -1
View File
@@ -5,6 +5,7 @@
#include "messages/Emote.hpp"
#include "providers/bttv/BttvEmotes.hpp"
#include "providers/ffz/FfzEmotes.hpp"
#include "providers/seventv/SeventvEmotes.hpp"
#include "providers/twitch/TwitchChannel.hpp"
#include "providers/twitch/TwitchIrcServer.hpp"
#include "singletons/Emotes.hpp"
@@ -99,17 +100,25 @@ void InputCompletionPopup::updateEmotes(const QString &text, ChannelPtr channel)
if (tc)
{
// TODO extract "Channel BetterTTV" text into a #define.
// TODO extract "Channel {BetterTTV,7TV,FrankerFaceZ}" text into a #define.
if (auto bttv = tc->bttvEmotes())
addEmotes(emotes, *bttv, text, "Channel BetterTTV");
if (auto ffz = tc->ffzEmotes())
addEmotes(emotes, *ffz, text, "Channel FrankerFaceZ");
if (auto seventv = tc->seventvEmotes())
{
addEmotes(emotes, *seventv, text, "Channel 7TV");
}
}
if (auto bttvG = getApp()->twitch->getBttvEmotes().emotes())
addEmotes(emotes, *bttvG, text, "Global BetterTTV");
if (auto ffzG = getApp()->twitch->getFfzEmotes().emotes())
addEmotes(emotes, *ffzG, text, "Global FrankerFaceZ");
if (auto seventvG = getApp()->twitch->getSeventvEmotes().globalEmotes())
{
addEmotes(emotes, *seventvG, text, "Global 7TV");
}
}
addEmojis(emotes, getApp()->emotes->emojis.emojis, text);
+1
View File
@@ -1198,6 +1198,7 @@ void Split::reloadChannelAndSubscriberEmotes()
{
twitchChannel->refreshBTTVChannelEmotes(true);
twitchChannel->refreshFFZChannelEmotes(true);
twitchChannel->refreshSevenTVChannelEmotes(true);
}
}
+1
View File
@@ -999,6 +999,7 @@ void SplitHeader::reloadChannelEmotes()
{
twitchChannel->refreshFFZChannelEmotes(true);
twitchChannel->refreshBTTVChannelEmotes(true);
twitchChannel->refreshSevenTVChannelEmotes(true);
}
}