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
-12
View File
@@ -1,12 +0,0 @@
#include "singletons/Emotes.hpp"
namespace chatterino {
Emotes::Emotes()
{
this->emojis.load();
this->gifTimer.initialize();
}
} // namespace chatterino
-45
View File
@@ -1,45 +0,0 @@
#pragma once
#include "providers/emoji/Emojis.hpp"
#include "providers/twitch/TwitchEmotes.hpp"
#include "singletons/helper/GifTimer.hpp"
namespace chatterino {
class IEmotes
{
public:
virtual ~IEmotes() = default;
virtual ITwitchEmotes *getTwitchEmotes() = 0;
virtual IEmojis *getEmojis() = 0;
virtual GIFTimer &getGIFTimer() = 0;
};
class Emotes final : public IEmotes
{
public:
Emotes();
ITwitchEmotes *getTwitchEmotes() final
{
return &this->twitch;
}
IEmojis *getEmojis() final
{
return &this->emojis;
}
GIFTimer &getGIFTimer() final
{
return this->gifTimer;
}
TwitchEmotes twitch;
Emojis emojis;
GIFTimer gifTimer;
};
} // namespace chatterino