refactor: turn Emotes into EmoteController (#6516)

* refactor: turn `Emotes` into `EmoteController`

* changelog

* why does clang-format do this???

* nit: remove unused include from EmoteController.hpp

---------

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
nerix
2025-10-04 12:05:27 +02:00
committed by GitHub
parent 2bf617f37a
commit c5b0669812
33 changed files with 158 additions and 154 deletions
+21
View File
@@ -0,0 +1,21 @@
#pragma once
#include "controllers/emotes/EmoteController.hpp"
#include "providers/emoji/Emojis.hpp"
namespace chatterino::mock {
class EmoteController : public chatterino::EmoteController
{
public:
EmoteController()
{
this->getEmojis()->load();
}
void initialize() override
{
}
};
} // namespace chatterino::mock
-38
View File
@@ -1,38 +0,0 @@
#pragma once
#include "singletons/Emotes.hpp"
namespace chatterino::mock {
class Emotes : public IEmotes
{
public:
Emotes()
{
this->emojis.load();
// don't initialize GIFTimer
}
ITwitchEmotes *getTwitchEmotes() override
{
return &this->twitch;
}
IEmojis *getEmojis() override
{
return &this->emojis;
}
GIFTimer &getGIFTimer() override
{
return this->gifTimer;
}
private:
TwitchEmotes twitch;
Emojis emojis;
GIFTimer gifTimer;
};
} // namespace chatterino::mock
+1 -1
View File
@@ -56,7 +56,7 @@ public:
return nullptr;
}
IEmotes *getEmotes() override
EmoteController *getEmotes() override
{
assert(
false &&