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:
@@ -1,12 +0,0 @@
|
||||
#include "singletons/Emotes.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
Emotes::Emotes()
|
||||
{
|
||||
this->emojis.load();
|
||||
|
||||
this->gifTimer.initialize();
|
||||
}
|
||||
|
||||
} // namespace chatterino
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user