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
+20
View File
@@ -54,6 +54,7 @@ void TwitchIrcServer::initialize(Settings &settings, Paths &paths)
this->reloadBTTVGlobalEmotes();
this->reloadFFZGlobalEmotes();
this->reloadSevenTVGlobalEmotes();
/* Refresh all twitch channel's live status in bulk every 30 seconds after starting chatterino */
QObject::connect(&this->bulkLiveStatusTimer_, &QTimer::timeout, [=] {
@@ -467,6 +468,10 @@ const FfzEmotes &TwitchIrcServer::getFfzEmotes() const
{
return this->ffz;
}
const SeventvEmotes &TwitchIrcServer::getSeventvEmotes() const
{
return this->seventv_;
}
void TwitchIrcServer::reloadBTTVGlobalEmotes()
{
@@ -497,4 +502,19 @@ void TwitchIrcServer::reloadAllFFZChannelEmotes()
}
});
}
void TwitchIrcServer::reloadSevenTVGlobalEmotes()
{
this->seventv_.loadGlobalEmotes();
}
void TwitchIrcServer::reloadAllSevenTVChannelEmotes()
{
this->forEachChannel([](const auto &chan) {
if (auto *channel = dynamic_cast<TwitchChannel *>(chan.get()))
{
channel->refreshSevenTVChannelEmotes(false);
}
});
}
} // namespace chatterino