feat: show BTTV Pro badges (#6625)

Reviewed-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
nerix
2025-12-07 15:15:58 +01:00
committed by GitHub
parent ab8e0751b1
commit 0aff6fbe83
31 changed files with 394 additions and 82 deletions
+12 -1
View File
@@ -11,6 +11,7 @@
#include "controllers/ignores/IgnoreController.hpp"
#include "controllers/notifications/NotificationController.hpp"
#include "controllers/sound/ISoundController.hpp"
#include "providers/bttv/BttvBadges.hpp"
#include "providers/bttv/BttvEmotes.hpp"
#include "providers/ffz/FfzEmotes.hpp"
#include "providers/links/LinkResolver.hpp"
@@ -99,7 +100,8 @@ ISoundController *makeSoundController(Settings &settings)
BttvLiveUpdates *makeBttvLiveUpdates(Settings &settings)
{
bool enabled =
settings.enableBTTVLiveUpdates && settings.enableBTTVChannelEmotes;
settings.enableBTTVLiveUpdates &&
(settings.enableBTTVChannelEmotes || settings.showBadgesBttv);
if (enabled)
{
@@ -179,6 +181,7 @@ Application::Application(Settings &_settings, const Paths &paths,
, highlights(new HighlightController(_settings, this->accounts.get()))
, twitch(new TwitchIrcServer)
, ffzBadges(new FfzBadges)
, bttvBadges(new BttvBadges)
, seventvBadges(new SeventvBadges)
, userData(new UserDataController(paths))
, sound(makeSoundController(_settings))
@@ -424,6 +427,14 @@ FfzBadges *Application::getFfzBadges()
return this->ffzBadges.get();
}
BttvBadges *Application::getBttvBadges()
{
// BttvBadges handles its own locks, so we don't need to assert that this is called in the GUI thread
assert(this->bttvBadges);
return this->bttvBadges.get();
}
SeventvBadges *Application::getSeventvBadges()
{
// SeventvBadges handles its own locks, so we don't need to assert that this is called in the GUI thread