refactor: Make ChatterinoBadges less of a singleton (#5103)

This commit is contained in:
pajlada
2024-01-19 17:25:52 +01:00
committed by GitHub
parent 5bf1a5a7dd
commit 326a402710
9 changed files with 83 additions and 33 deletions
+17
View File
@@ -0,0 +1,17 @@
#pragma once
#include "providers/chatterino/ChatterinoBadges.hpp"
namespace chatterino::mock {
class ChatterinoBadges : public IChatterinoBadges
{
public:
std::optional<EmotePtr> getBadge(const UserId &id) override
{
(void)id;
return std::nullopt;
}
};
} // namespace chatterino::mock
+1 -1
View File
@@ -134,7 +134,7 @@ public:
return nullptr;
}
ChatterinoBadges *getChatterinoBadges() override
IChatterinoBadges *getChatterinoBadges() override
{
assert(false && "EmptyApplication::getChatterinoBadges was called "
"without being initialized");