feat: add filter for external badges (#6709)

Co-authored-by: Ava Chow <github@achow101.com>
Reviewed-by: Nerixyz <nerixdev@outlook.de>
This commit is contained in:
pajlada
2026-01-05 16:20:21 +01:00
committed by GitHub
parent 25ea6b9214
commit 327dc0ebcb
186 changed files with 554 additions and 40 deletions
+7 -5
View File
@@ -66,7 +66,11 @@ void FfzBadges::load()
jsonBadge["height"].toInt(18));
auto emote = Emote{
.name = EmoteName{},
.name =
EmoteName{
u"frankerfacez:" %
jsonBadge.value("name").toString(),
},
.images =
ImageSet{
Image::fromUrl(
@@ -82,13 +86,11 @@ void FfzBadges::load()
.homePage = Url{},
};
Badge badge;
int badgeID = jsonBadge.value("id").toInt();
this->badges[badgeID] = Badge{
std::make_shared<const Emote>(std::move(emote)),
QColor(jsonBadge.value("color").toString()),
.emote = std::make_shared<const Emote>(std::move(emote)),
.color = QColor(jsonBadge.value("color").toString()),
};
// Find users with this badge
+1
View File
@@ -4,6 +4,7 @@
#include "util/ThreadGuard.hpp"
#include <QColor>
#include <QString>
#include <memory>
#include <optional>