chore: remove Singleton & replace getIApp with getApp (#5514)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#include "FfzBadges.hpp"
|
||||
#include "providers/ffz/FfzBadges.hpp"
|
||||
|
||||
#include "common/network/NetworkRequest.hpp"
|
||||
#include "common/network/NetworkResult.hpp"
|
||||
@@ -17,11 +17,6 @@
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
void FfzBadges::initialize(Settings &settings, const Paths &paths)
|
||||
{
|
||||
this->load();
|
||||
}
|
||||
|
||||
std::vector<FfzBadges::Badge> FfzBadges::getUserBadges(const UserId &id)
|
||||
{
|
||||
std::vector<Badge> badges;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "common/Aliases.hpp"
|
||||
#include "common/Singleton.hpp"
|
||||
#include "util/QStringHash.hpp"
|
||||
#include "util/ThreadGuard.hpp"
|
||||
|
||||
@@ -19,10 +18,9 @@ namespace chatterino {
|
||||
struct Emote;
|
||||
using EmotePtr = std::shared_ptr<const Emote>;
|
||||
|
||||
class FfzBadges : public Singleton
|
||||
class FfzBadges
|
||||
{
|
||||
public:
|
||||
void initialize(Settings &settings, const Paths &paths) override;
|
||||
FfzBadges() = default;
|
||||
|
||||
struct Badge {
|
||||
@@ -33,9 +31,9 @@ public:
|
||||
std::vector<Badge> getUserBadges(const UserId &id);
|
||||
std::optional<Badge> getBadge(int badgeID) const;
|
||||
|
||||
private:
|
||||
void load();
|
||||
|
||||
private:
|
||||
std::shared_mutex mutex_;
|
||||
|
||||
// userBadges points a user ID to the list of badges they have
|
||||
|
||||
Reference in New Issue
Block a user