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:
@@ -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
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "util/ThreadGuard.hpp"
|
||||
|
||||
#include <QColor>
|
||||
#include <QString>
|
||||
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
Reference in New Issue
Block a user