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:
@@ -16,6 +16,7 @@
|
|||||||
- Dev: Removed dependency to Qt5 Compatibility module by updating libcommuni. (#6500)
|
- Dev: Removed dependency to Qt5 Compatibility module by updating libcommuni. (#6500)
|
||||||
- Dev: Merged emote element flags from different providers into two. (#6511)
|
- Dev: Merged emote element flags from different providers into two. (#6511)
|
||||||
- Dev: Removed unused method in `Emojis`. (#6517)
|
- Dev: Removed unused method in `Emojis`. (#6517)
|
||||||
|
- Dev: Refactored `Emotes` into `EmoteController`. (#6516)
|
||||||
|
|
||||||
## 2.5.4
|
## 2.5.4
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#include "messages/Emote.hpp"
|
#include "messages/Emote.hpp"
|
||||||
#include "mocks/BaseApplication.hpp"
|
#include "mocks/BaseApplication.hpp"
|
||||||
#include "mocks/DisabledStreamerMode.hpp"
|
#include "mocks/DisabledStreamerMode.hpp"
|
||||||
#include "mocks/Emotes.hpp"
|
#include "mocks/EmoteController.hpp"
|
||||||
#include "mocks/LinkResolver.hpp"
|
#include "mocks/LinkResolver.hpp"
|
||||||
#include "mocks/Logging.hpp"
|
#include "mocks/Logging.hpp"
|
||||||
#include "mocks/TwitchIrcServer.hpp"
|
#include "mocks/TwitchIrcServer.hpp"
|
||||||
@@ -41,7 +41,7 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
IEmotes *getEmotes() override
|
EmoteController *getEmotes() override
|
||||||
{
|
{
|
||||||
return &this->emotes;
|
return &this->emotes;
|
||||||
}
|
}
|
||||||
@@ -118,7 +118,7 @@ public:
|
|||||||
|
|
||||||
mock::EmptyLogging logging;
|
mock::EmptyLogging logging;
|
||||||
AccountController accounts;
|
AccountController accounts;
|
||||||
mock::Emotes emotes;
|
mock::EmoteController emotes;
|
||||||
mock::UserDataController userData;
|
mock::UserDataController userData;
|
||||||
mock::MockTwitchIrcServer twitch;
|
mock::MockTwitchIrcServer twitch;
|
||||||
mock::EmptyLinkResolver linkResolver;
|
mock::EmptyLinkResolver linkResolver;
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -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
|
|
||||||
@@ -56,7 +56,7 @@ public:
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
IEmotes *getEmotes() override
|
EmoteController *getEmotes() override
|
||||||
{
|
{
|
||||||
assert(
|
assert(
|
||||||
false &&
|
false &&
|
||||||
|
|||||||
+4
-3
@@ -24,6 +24,7 @@
|
|||||||
#ifdef CHATTERINO_HAVE_PLUGINS
|
#ifdef CHATTERINO_HAVE_PLUGINS
|
||||||
# include "controllers/plugins/PluginController.hpp"
|
# include "controllers/plugins/PluginController.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
#include "controllers/emotes/EmoteController.hpp"
|
||||||
#include "controllers/sound/MiniaudioBackend.hpp"
|
#include "controllers/sound/MiniaudioBackend.hpp"
|
||||||
#include "controllers/sound/NullBackend.hpp"
|
#include "controllers/sound/NullBackend.hpp"
|
||||||
#include "controllers/twitch/LiveController.hpp"
|
#include "controllers/twitch/LiveController.hpp"
|
||||||
@@ -43,7 +44,6 @@
|
|||||||
#include "providers/twitch/TwitchIrcServer.hpp"
|
#include "providers/twitch/TwitchIrcServer.hpp"
|
||||||
#include "providers/twitch/TwitchUsers.hpp"
|
#include "providers/twitch/TwitchUsers.hpp"
|
||||||
#include "singletons/CrashHandler.hpp"
|
#include "singletons/CrashHandler.hpp"
|
||||||
#include "singletons/Emotes.hpp"
|
|
||||||
#include "singletons/Fonts.hpp"
|
#include "singletons/Fonts.hpp"
|
||||||
#include "singletons/helper/LoggingChannel.hpp"
|
#include "singletons/helper/LoggingChannel.hpp"
|
||||||
#include "singletons/Logging.hpp"
|
#include "singletons/Logging.hpp"
|
||||||
@@ -163,7 +163,7 @@ Application::Application(Settings &_settings, const Paths &paths,
|
|||||||
, themes(new Theme(paths))
|
, themes(new Theme(paths))
|
||||||
, fonts(new Fonts(_settings))
|
, fonts(new Fonts(_settings))
|
||||||
, logging(new Logging(_settings))
|
, logging(new Logging(_settings))
|
||||||
, emotes(new Emotes)
|
, emotes(new EmoteController)
|
||||||
, accounts(new AccountController)
|
, accounts(new AccountController)
|
||||||
, eventSub(makeEventSubController(_settings))
|
, eventSub(makeEventSubController(_settings))
|
||||||
, hotkeys(new HotkeyController)
|
, hotkeys(new HotkeyController)
|
||||||
@@ -233,6 +233,7 @@ void Application::initialize(Settings &settings, const Paths &paths)
|
|||||||
{
|
{
|
||||||
getSettings()->currentVersion.setValue(CHATTERINO_VERSION);
|
getSettings()->currentVersion.setValue(CHATTERINO_VERSION);
|
||||||
}
|
}
|
||||||
|
this->emotes->initialize();
|
||||||
|
|
||||||
this->accounts->load();
|
this->accounts->load();
|
||||||
|
|
||||||
@@ -343,7 +344,7 @@ Fonts *Application::getFonts()
|
|||||||
return this->fonts.get();
|
return this->fonts.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
IEmotes *Application::getEmotes()
|
EmoteController *Application::getEmotes()
|
||||||
{
|
{
|
||||||
assertInGuiThread();
|
assertInGuiThread();
|
||||||
assert(this->emotes);
|
assert(this->emotes);
|
||||||
|
|||||||
+4
-5
@@ -32,8 +32,7 @@ class WindowManager;
|
|||||||
class ILogging;
|
class ILogging;
|
||||||
class Logging;
|
class Logging;
|
||||||
class Paths;
|
class Paths;
|
||||||
class Emotes;
|
class EmoteController;
|
||||||
class IEmotes;
|
|
||||||
class Settings;
|
class Settings;
|
||||||
class Fonts;
|
class Fonts;
|
||||||
class Toasts;
|
class Toasts;
|
||||||
@@ -77,7 +76,7 @@ public:
|
|||||||
virtual const Args &getArgs() = 0;
|
virtual const Args &getArgs() = 0;
|
||||||
virtual Theme *getThemes() = 0;
|
virtual Theme *getThemes() = 0;
|
||||||
virtual Fonts *getFonts() = 0;
|
virtual Fonts *getFonts() = 0;
|
||||||
virtual IEmotes *getEmotes() = 0;
|
virtual EmoteController *getEmotes() = 0;
|
||||||
virtual AccountController *getAccounts() = 0;
|
virtual AccountController *getAccounts() = 0;
|
||||||
virtual HotkeyController *getHotkeys() = 0;
|
virtual HotkeyController *getHotkeys() = 0;
|
||||||
virtual WindowManager *getWindows() = 0;
|
virtual WindowManager *getWindows() = 0;
|
||||||
@@ -149,7 +148,7 @@ private:
|
|||||||
std::unique_ptr<Theme> themes;
|
std::unique_ptr<Theme> themes;
|
||||||
std::unique_ptr<Fonts> fonts;
|
std::unique_ptr<Fonts> fonts;
|
||||||
std::unique_ptr<Logging> logging;
|
std::unique_ptr<Logging> logging;
|
||||||
std::unique_ptr<Emotes> emotes;
|
std::unique_ptr<EmoteController> emotes;
|
||||||
std::unique_ptr<AccountController> accounts;
|
std::unique_ptr<AccountController> accounts;
|
||||||
std::unique_ptr<eventsub::IController> eventSub;
|
std::unique_ptr<eventsub::IController> eventSub;
|
||||||
std::unique_ptr<HotkeyController> hotkeys;
|
std::unique_ptr<HotkeyController> hotkeys;
|
||||||
@@ -194,7 +193,7 @@ public:
|
|||||||
}
|
}
|
||||||
Theme *getThemes() override;
|
Theme *getThemes() override;
|
||||||
Fonts *getFonts() override;
|
Fonts *getFonts() override;
|
||||||
IEmotes *getEmotes() override;
|
EmoteController *getEmotes() override;
|
||||||
AccountController *getAccounts() override;
|
AccountController *getAccounts() override;
|
||||||
HotkeyController *getHotkeys() override;
|
HotkeyController *getHotkeys() override;
|
||||||
WindowManager *getWindows() override;
|
WindowManager *getWindows() override;
|
||||||
|
|||||||
+3
-2
@@ -158,6 +158,9 @@ set(SOURCE_FILES
|
|||||||
controllers/completion/TabCompletionModel.cpp
|
controllers/completion/TabCompletionModel.cpp
|
||||||
controllers/completion/TabCompletionModel.hpp
|
controllers/completion/TabCompletionModel.hpp
|
||||||
|
|
||||||
|
controllers/emotes/EmoteController.cpp
|
||||||
|
controllers/emotes/EmoteController.hpp
|
||||||
|
|
||||||
controllers/filters/FilterModel.cpp
|
controllers/filters/FilterModel.cpp
|
||||||
controllers/filters/FilterModel.hpp
|
controllers/filters/FilterModel.hpp
|
||||||
controllers/filters/FilterRecord.cpp
|
controllers/filters/FilterRecord.cpp
|
||||||
@@ -473,8 +476,6 @@ set(SOURCE_FILES
|
|||||||
|
|
||||||
singletons/CrashHandler.cpp
|
singletons/CrashHandler.cpp
|
||||||
singletons/CrashHandler.hpp
|
singletons/CrashHandler.hpp
|
||||||
singletons/Emotes.cpp
|
|
||||||
singletons/Emotes.hpp
|
|
||||||
singletons/Fonts.cpp
|
singletons/Fonts.cpp
|
||||||
singletons/Fonts.hpp
|
singletons/Fonts.hpp
|
||||||
singletons/ImageUploader.cpp
|
singletons/ImageUploader.cpp
|
||||||
|
|||||||
@@ -30,13 +30,14 @@
|
|||||||
#include "controllers/commands/Command.hpp"
|
#include "controllers/commands/Command.hpp"
|
||||||
#include "controllers/commands/CommandContext.hpp"
|
#include "controllers/commands/CommandContext.hpp"
|
||||||
#include "controllers/commands/CommandModel.hpp"
|
#include "controllers/commands/CommandModel.hpp"
|
||||||
|
#include "controllers/emotes/EmoteController.hpp"
|
||||||
#include "controllers/plugins/PluginController.hpp"
|
#include "controllers/plugins/PluginController.hpp"
|
||||||
#include "messages/Message.hpp"
|
#include "messages/Message.hpp"
|
||||||
#include "messages/MessageBuilder.hpp"
|
#include "messages/MessageBuilder.hpp"
|
||||||
|
#include "providers/emoji/Emojis.hpp"
|
||||||
#include "providers/twitch/TwitchAccount.hpp"
|
#include "providers/twitch/TwitchAccount.hpp"
|
||||||
#include "providers/twitch/TwitchChannel.hpp"
|
#include "providers/twitch/TwitchChannel.hpp"
|
||||||
#include "providers/twitch/TwitchCommon.hpp"
|
#include "providers/twitch/TwitchCommon.hpp"
|
||||||
#include "singletons/Emotes.hpp"
|
|
||||||
#include "singletons/Paths.hpp"
|
#include "singletons/Paths.hpp"
|
||||||
#include "util/CombinePath.hpp"
|
#include "util/CombinePath.hpp"
|
||||||
#include "util/QStringHash.hpp"
|
#include "util/QStringHash.hpp"
|
||||||
|
|||||||
@@ -4,15 +4,16 @@
|
|||||||
#include "common/LinkParser.hpp"
|
#include "common/LinkParser.hpp"
|
||||||
#include "controllers/accounts/AccountController.hpp"
|
#include "controllers/accounts/AccountController.hpp"
|
||||||
#include "controllers/commands/CommandContext.hpp"
|
#include "controllers/commands/CommandContext.hpp"
|
||||||
|
#include "controllers/emotes/EmoteController.hpp"
|
||||||
#include "messages/Message.hpp"
|
#include "messages/Message.hpp"
|
||||||
#include "messages/MessageBuilder.hpp"
|
#include "messages/MessageBuilder.hpp"
|
||||||
#include "messages/MessageElement.hpp"
|
#include "messages/MessageElement.hpp"
|
||||||
#include "providers/bttv/BttvEmotes.hpp"
|
#include "providers/bttv/BttvEmotes.hpp"
|
||||||
|
#include "providers/emoji/Emojis.hpp"
|
||||||
#include "providers/ffz/FfzEmotes.hpp"
|
#include "providers/ffz/FfzEmotes.hpp"
|
||||||
#include "providers/twitch/api/Helix.hpp"
|
#include "providers/twitch/api/Helix.hpp"
|
||||||
#include "providers/twitch/TwitchAccount.hpp"
|
#include "providers/twitch/TwitchAccount.hpp"
|
||||||
#include "providers/twitch/TwitchIrcServer.hpp"
|
#include "providers/twitch/TwitchIrcServer.hpp"
|
||||||
#include "singletons/Emotes.hpp"
|
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
#include "singletons/StreamerMode.hpp"
|
#include "singletons/StreamerMode.hpp"
|
||||||
#include "singletons/Theme.hpp"
|
#include "singletons/Theme.hpp"
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include "Application.hpp"
|
#include "Application.hpp"
|
||||||
#include "controllers/accounts/AccountController.hpp"
|
#include "controllers/accounts/AccountController.hpp"
|
||||||
#include "controllers/completion/sources/Helpers.hpp"
|
#include "controllers/completion/sources/Helpers.hpp"
|
||||||
|
#include "controllers/emotes/EmoteController.hpp"
|
||||||
#include "providers/bttv/BttvEmotes.hpp"
|
#include "providers/bttv/BttvEmotes.hpp"
|
||||||
#include "providers/emoji/Emojis.hpp"
|
#include "providers/emoji/Emojis.hpp"
|
||||||
#include "providers/ffz/FfzEmotes.hpp"
|
#include "providers/ffz/FfzEmotes.hpp"
|
||||||
@@ -10,7 +11,6 @@
|
|||||||
#include "providers/twitch/TwitchAccount.hpp"
|
#include "providers/twitch/TwitchAccount.hpp"
|
||||||
#include "providers/twitch/TwitchChannel.hpp"
|
#include "providers/twitch/TwitchChannel.hpp"
|
||||||
#include "providers/twitch/TwitchIrcServer.hpp"
|
#include "providers/twitch/TwitchIrcServer.hpp"
|
||||||
#include "singletons/Emotes.hpp"
|
|
||||||
#include "widgets/splits/InputCompletionItem.hpp"
|
#include "widgets/splits/InputCompletionItem.hpp"
|
||||||
|
|
||||||
namespace chatterino::completion {
|
namespace chatterino::completion {
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
#include "controllers/emotes/EmoteController.hpp"
|
||||||
|
|
||||||
|
#include "providers/emoji/Emojis.hpp"
|
||||||
|
#include "providers/twitch/TwitchEmotes.hpp"
|
||||||
|
#include "singletons/helper/GifTimer.hpp"
|
||||||
|
|
||||||
|
namespace chatterino {
|
||||||
|
|
||||||
|
EmoteController::EmoteController()
|
||||||
|
: twitchEmotes_(std::make_unique<TwitchEmotes>())
|
||||||
|
, emojis_(std::make_unique<Emojis>())
|
||||||
|
, gifTimer_(std::make_unique<GIFTimer>())
|
||||||
|
{
|
||||||
|
}
|
||||||
|
EmoteController::~EmoteController() = default;
|
||||||
|
|
||||||
|
void EmoteController::initialize()
|
||||||
|
{
|
||||||
|
this->emojis_->load();
|
||||||
|
this->gifTimer_->initialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
TwitchEmotes *EmoteController::getTwitchEmotes() const
|
||||||
|
{
|
||||||
|
return this->twitchEmotes_.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
Emojis *EmoteController::getEmojis() const
|
||||||
|
{
|
||||||
|
return this->emojis_.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
GIFTimer *EmoteController::getGIFTimer() const
|
||||||
|
{
|
||||||
|
return this->gifTimer_.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace chatterino
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
namespace chatterino {
|
||||||
|
|
||||||
|
class TwitchEmotes;
|
||||||
|
class Emojis;
|
||||||
|
class GIFTimer;
|
||||||
|
|
||||||
|
class EmoteController
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
EmoteController();
|
||||||
|
virtual ~EmoteController();
|
||||||
|
|
||||||
|
virtual void initialize();
|
||||||
|
|
||||||
|
TwitchEmotes *getTwitchEmotes() const;
|
||||||
|
|
||||||
|
Emojis *getEmojis() const;
|
||||||
|
|
||||||
|
GIFTimer *getGIFTimer() const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::unique_ptr<TwitchEmotes> twitchEmotes_;
|
||||||
|
std::unique_ptr<Emojis> emojis_;
|
||||||
|
std::unique_ptr<GIFTimer> gifTimer_;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace chatterino
|
||||||
@@ -5,9 +5,9 @@
|
|||||||
#include "common/network/NetworkRequest.hpp"
|
#include "common/network/NetworkRequest.hpp"
|
||||||
#include "common/network/NetworkResult.hpp"
|
#include "common/network/NetworkResult.hpp"
|
||||||
#include "common/QLogging.hpp"
|
#include "common/QLogging.hpp"
|
||||||
|
#include "controllers/emotes/EmoteController.hpp"
|
||||||
#include "debug/AssertInGuiThread.hpp"
|
#include "debug/AssertInGuiThread.hpp"
|
||||||
#include "debug/Benchmark.hpp"
|
#include "debug/Benchmark.hpp"
|
||||||
#include "singletons/Emotes.hpp"
|
|
||||||
#include "singletons/helper/GifTimer.hpp"
|
#include "singletons/helper/GifTimer.hpp"
|
||||||
#include "singletons/WindowManager.hpp"
|
#include "singletons/WindowManager.hpp"
|
||||||
#include "util/DebugCount.hpp"
|
#include "util/DebugCount.hpp"
|
||||||
@@ -58,7 +58,7 @@ Frames::Frames(QList<Frame> &&frames)
|
|||||||
DebugCount::increase("animated images");
|
DebugCount::increase("animated images");
|
||||||
|
|
||||||
this->gifTimerConnection_ =
|
this->gifTimerConnection_ =
|
||||||
app->getEmotes()->getGIFTimer().signal.connect([this] {
|
app->getEmotes()->getGIFTimer()->signal.connect([this] {
|
||||||
this->advance();
|
this->advance();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ Frames::Frames(QList<Frame> &&frames)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->durationOffset_ = std::min<int>(
|
this->durationOffset_ = std::min<int>(
|
||||||
int(app->getEmotes()->getGIFTimer().position() % totalLength),
|
int(app->getEmotes()->getGIFTimer()->position() % totalLength),
|
||||||
60000);
|
60000);
|
||||||
}
|
}
|
||||||
this->processOffset();
|
this->processOffset();
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include "common/Literals.hpp"
|
#include "common/Literals.hpp"
|
||||||
#include "common/QLogging.hpp"
|
#include "common/QLogging.hpp"
|
||||||
#include "controllers/accounts/AccountController.hpp"
|
#include "controllers/accounts/AccountController.hpp"
|
||||||
|
#include "controllers/emotes/EmoteController.hpp"
|
||||||
#include "controllers/highlights/HighlightController.hpp"
|
#include "controllers/highlights/HighlightController.hpp"
|
||||||
#include "controllers/ignores/IgnoreController.hpp"
|
#include "controllers/ignores/IgnoreController.hpp"
|
||||||
#include "controllers/ignores/IgnorePhrase.hpp"
|
#include "controllers/ignores/IgnorePhrase.hpp"
|
||||||
@@ -18,6 +19,7 @@
|
|||||||
#include "providers/bttv/BttvEmotes.hpp"
|
#include "providers/bttv/BttvEmotes.hpp"
|
||||||
#include "providers/chatterino/ChatterinoBadges.hpp"
|
#include "providers/chatterino/ChatterinoBadges.hpp"
|
||||||
#include "providers/colors/ColorProvider.hpp"
|
#include "providers/colors/ColorProvider.hpp"
|
||||||
|
#include "providers/emoji/Emojis.hpp"
|
||||||
#include "providers/ffz/FfzBadges.hpp"
|
#include "providers/ffz/FfzBadges.hpp"
|
||||||
#include "providers/ffz/FfzEmotes.hpp"
|
#include "providers/ffz/FfzEmotes.hpp"
|
||||||
#include "providers/links/LinkResolver.hpp"
|
#include "providers/links/LinkResolver.hpp"
|
||||||
@@ -33,7 +35,6 @@
|
|||||||
#include "providers/twitch/TwitchIrcServer.hpp"
|
#include "providers/twitch/TwitchIrcServer.hpp"
|
||||||
#include "providers/twitch/TwitchUsers.hpp"
|
#include "providers/twitch/TwitchUsers.hpp"
|
||||||
#include "providers/twitch/UserColor.hpp"
|
#include "providers/twitch/UserColor.hpp"
|
||||||
#include "singletons/Emotes.hpp"
|
|
||||||
#include "singletons/Resources.hpp"
|
#include "singletons/Resources.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
#include "singletons/StreamerMode.hpp"
|
#include "singletons/StreamerMode.hpp"
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include "Application.hpp"
|
#include "Application.hpp"
|
||||||
#include "common/Literals.hpp"
|
#include "common/Literals.hpp"
|
||||||
|
#include "controllers/emotes/EmoteController.hpp"
|
||||||
#include "controllers/moderationactions/ModerationAction.hpp"
|
#include "controllers/moderationactions/ModerationAction.hpp"
|
||||||
#include "debug/Benchmark.hpp"
|
#include "debug/Benchmark.hpp"
|
||||||
#include "messages/Emote.hpp"
|
#include "messages/Emote.hpp"
|
||||||
@@ -10,7 +11,7 @@
|
|||||||
#include "messages/layouts/MessageLayoutContext.hpp"
|
#include "messages/layouts/MessageLayoutContext.hpp"
|
||||||
#include "messages/layouts/MessageLayoutElement.hpp"
|
#include "messages/layouts/MessageLayoutElement.hpp"
|
||||||
#include "providers/emoji/Emojis.hpp"
|
#include "providers/emoji/Emojis.hpp"
|
||||||
#include "singletons/Emotes.hpp"
|
#include "providers/twitch/TwitchEmotes.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
#include "singletons/Theme.hpp"
|
#include "singletons/Theme.hpp"
|
||||||
#include "util/DebugCount.hpp"
|
#include "util/DebugCount.hpp"
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include "common/network/NetworkResult.hpp" // IWYU pragma: keep
|
#include "common/network/NetworkResult.hpp" // IWYU pragma: keep
|
||||||
#include "common/QLogging.hpp"
|
#include "common/QLogging.hpp"
|
||||||
#include "controllers/accounts/AccountController.hpp"
|
#include "controllers/accounts/AccountController.hpp"
|
||||||
|
#include "controllers/emotes/EmoteController.hpp"
|
||||||
#include "debug/AssertInGuiThread.hpp"
|
#include "debug/AssertInGuiThread.hpp"
|
||||||
#include "messages/Emote.hpp"
|
#include "messages/Emote.hpp"
|
||||||
#include "messages/MessageBuilder.hpp"
|
#include "messages/MessageBuilder.hpp"
|
||||||
@@ -12,7 +13,6 @@
|
|||||||
#include "providers/twitch/api/Helix.hpp"
|
#include "providers/twitch/api/Helix.hpp"
|
||||||
#include "providers/twitch/TwitchCommon.hpp"
|
#include "providers/twitch/TwitchCommon.hpp"
|
||||||
#include "providers/twitch/TwitchUsers.hpp"
|
#include "providers/twitch/TwitchUsers.hpp"
|
||||||
#include "singletons/Emotes.hpp"
|
|
||||||
#include "util/CancellationToken.hpp"
|
#include "util/CancellationToken.hpp"
|
||||||
#include "util/QStringHash.hpp" // IWYU pragma: keep
|
#include "util/QStringHash.hpp" // IWYU pragma: keep
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "common/network/NetworkResult.hpp"
|
#include "common/network/NetworkResult.hpp"
|
||||||
#include "common/QLogging.hpp"
|
#include "common/QLogging.hpp"
|
||||||
#include "controllers/accounts/AccountController.hpp"
|
#include "controllers/accounts/AccountController.hpp"
|
||||||
|
#include "controllers/emotes/EmoteController.hpp"
|
||||||
#include "controllers/notifications/NotificationController.hpp"
|
#include "controllers/notifications/NotificationController.hpp"
|
||||||
#include "controllers/twitch/LiveController.hpp"
|
#include "controllers/twitch/LiveController.hpp"
|
||||||
#include "messages/Emote.hpp"
|
#include "messages/Emote.hpp"
|
||||||
@@ -20,6 +21,7 @@
|
|||||||
#include "providers/bttv/BttvEmotes.hpp"
|
#include "providers/bttv/BttvEmotes.hpp"
|
||||||
#include "providers/bttv/BttvLiveUpdates.hpp"
|
#include "providers/bttv/BttvLiveUpdates.hpp"
|
||||||
#include "providers/bttv/liveupdates/BttvLiveUpdateMessages.hpp"
|
#include "providers/bttv/liveupdates/BttvLiveUpdateMessages.hpp"
|
||||||
|
#include "providers/emoji/Emojis.hpp"
|
||||||
#include "providers/ffz/FfzBadges.hpp"
|
#include "providers/ffz/FfzBadges.hpp"
|
||||||
#include "providers/ffz/FfzEmotes.hpp"
|
#include "providers/ffz/FfzEmotes.hpp"
|
||||||
#include "providers/recentmessages/Api.hpp"
|
#include "providers/recentmessages/Api.hpp"
|
||||||
@@ -36,7 +38,6 @@
|
|||||||
#include "providers/twitch/TwitchCommon.hpp"
|
#include "providers/twitch/TwitchCommon.hpp"
|
||||||
#include "providers/twitch/TwitchIrcServer.hpp"
|
#include "providers/twitch/TwitchIrcServer.hpp"
|
||||||
#include "providers/twitch/TwitchUsers.hpp"
|
#include "providers/twitch/TwitchUsers.hpp"
|
||||||
#include "singletons/Emotes.hpp"
|
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
#include "singletons/StreamerMode.hpp"
|
#include "singletons/StreamerMode.hpp"
|
||||||
#include "singletons/Toasts.hpp"
|
#include "singletons/Toasts.hpp"
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
#include "Application.hpp"
|
#include "Application.hpp"
|
||||||
#include "common/Aliases.hpp"
|
#include "common/Aliases.hpp"
|
||||||
#include "common/QLogging.hpp"
|
#include "common/QLogging.hpp"
|
||||||
#include "singletons/Emotes.hpp"
|
#include "controllers/emotes/EmoteController.hpp"
|
||||||
|
#include "providers/twitch/TwitchEmotes.hpp"
|
||||||
#include "util/IrcHelpers.hpp"
|
#include "util/IrcHelpers.hpp"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|||||||
@@ -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
|
|
||||||
@@ -4,8 +4,9 @@
|
|||||||
#include "common/FlagsEnum.hpp"
|
#include "common/FlagsEnum.hpp"
|
||||||
#include "common/Literals.hpp"
|
#include "common/Literals.hpp"
|
||||||
#include "common/QLogging.hpp"
|
#include "common/QLogging.hpp"
|
||||||
|
#include "controllers/emotes/EmoteController.hpp"
|
||||||
#include "controllers/hotkeys/HotkeyController.hpp"
|
#include "controllers/hotkeys/HotkeyController.hpp"
|
||||||
#include "singletons/Emotes.hpp"
|
#include "singletons/helper/GifTimer.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
#include "singletons/WindowManager.hpp"
|
#include "singletons/WindowManager.hpp"
|
||||||
#include "util/PostToThread.hpp"
|
#include "util/PostToThread.hpp"
|
||||||
@@ -191,7 +192,7 @@ OverlayWindow::OverlayWindow(IndirectChannel channel,
|
|||||||
this->updateScale();
|
this->updateScale();
|
||||||
|
|
||||||
this->triggerFirstActivation();
|
this->triggerFirstActivation();
|
||||||
getApp()->getEmotes()->getGIFTimer().registerOpenOverlayWindow();
|
getApp()->getEmotes()->getGIFTimer()->registerOpenOverlayWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
OverlayWindow::~OverlayWindow()
|
OverlayWindow::~OverlayWindow()
|
||||||
@@ -199,7 +200,7 @@ OverlayWindow::~OverlayWindow()
|
|||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
::DestroyCursor(this->sizeAllCursor_);
|
::DestroyCursor(this->sizeAllCursor_);
|
||||||
#endif
|
#endif
|
||||||
getApp()->getEmotes()->getGIFTimer().unregisterOpenOverlayWindow();
|
getApp()->getEmotes()->getGIFTimer()->unregisterOpenOverlayWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OverlayWindow::applyTheme()
|
void OverlayWindow::applyTheme()
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include "Application.hpp"
|
#include "Application.hpp"
|
||||||
#include "common/QLogging.hpp"
|
#include "common/QLogging.hpp"
|
||||||
#include "controllers/accounts/AccountController.hpp"
|
#include "controllers/accounts/AccountController.hpp"
|
||||||
|
#include "controllers/emotes/EmoteController.hpp"
|
||||||
#include "controllers/hotkeys/HotkeyController.hpp"
|
#include "controllers/hotkeys/HotkeyController.hpp"
|
||||||
#include "debug/Benchmark.hpp"
|
#include "debug/Benchmark.hpp"
|
||||||
#include "messages/Emote.hpp"
|
#include "messages/Emote.hpp"
|
||||||
@@ -10,11 +11,11 @@
|
|||||||
#include "messages/MessageBuilder.hpp"
|
#include "messages/MessageBuilder.hpp"
|
||||||
#include "messages/MessageElement.hpp"
|
#include "messages/MessageElement.hpp"
|
||||||
#include "providers/bttv/BttvEmotes.hpp"
|
#include "providers/bttv/BttvEmotes.hpp"
|
||||||
|
#include "providers/emoji/Emojis.hpp"
|
||||||
#include "providers/ffz/FfzEmotes.hpp"
|
#include "providers/ffz/FfzEmotes.hpp"
|
||||||
#include "providers/seventv/SeventvEmotes.hpp"
|
#include "providers/seventv/SeventvEmotes.hpp"
|
||||||
#include "providers/twitch/TwitchAccount.hpp"
|
#include "providers/twitch/TwitchAccount.hpp"
|
||||||
#include "providers/twitch/TwitchChannel.hpp"
|
#include "providers/twitch/TwitchChannel.hpp"
|
||||||
#include "singletons/Emotes.hpp"
|
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
#include "singletons/Theme.hpp"
|
#include "singletons/Theme.hpp"
|
||||||
#include "singletons/WindowManager.hpp"
|
#include "singletons/WindowManager.hpp"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#include "controllers/commands/CommandController.hpp"
|
#include "controllers/commands/CommandController.hpp"
|
||||||
#include "controllers/commands/common/ChannelAction.hpp"
|
#include "controllers/commands/common/ChannelAction.hpp"
|
||||||
#include "mocks/BaseApplication.hpp"
|
#include "mocks/BaseApplication.hpp"
|
||||||
#include "mocks/Emotes.hpp"
|
#include "mocks/EmoteController.hpp"
|
||||||
#include "mocks/Helix.hpp"
|
#include "mocks/Helix.hpp"
|
||||||
#include "mocks/Logging.hpp"
|
#include "mocks/Logging.hpp"
|
||||||
#include "mocks/TwitchIrcServer.hpp"
|
#include "mocks/TwitchIrcServer.hpp"
|
||||||
@@ -45,7 +45,7 @@ public:
|
|||||||
return &this->commands;
|
return &this->commands;
|
||||||
}
|
}
|
||||||
|
|
||||||
IEmotes *getEmotes() override
|
EmoteController *getEmotes() override
|
||||||
{
|
{
|
||||||
return &this->emotes;
|
return &this->emotes;
|
||||||
}
|
}
|
||||||
@@ -59,7 +59,7 @@ public:
|
|||||||
AccountController accounts;
|
AccountController accounts;
|
||||||
CommandController commands;
|
CommandController commands;
|
||||||
mock::MockTwitchIrcServer twitch;
|
mock::MockTwitchIrcServer twitch;
|
||||||
mock::Emotes emotes;
|
mock::EmoteController emotes;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#include "mocks/BaseApplication.hpp"
|
#include "mocks/BaseApplication.hpp"
|
||||||
#include "mocks/Channel.hpp"
|
#include "mocks/Channel.hpp"
|
||||||
#include "mocks/ChatterinoBadges.hpp"
|
#include "mocks/ChatterinoBadges.hpp"
|
||||||
#include "mocks/Emotes.hpp"
|
#include "mocks/EmoteController.hpp"
|
||||||
#include "mocks/EmptyApplication.hpp"
|
#include "mocks/EmptyApplication.hpp"
|
||||||
#include "mocks/Logging.hpp"
|
#include "mocks/Logging.hpp"
|
||||||
#include "mocks/TwitchIrcServer.hpp"
|
#include "mocks/TwitchIrcServer.hpp"
|
||||||
@@ -34,7 +34,7 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
IEmotes *getEmotes() override
|
EmoteController *getEmotes() override
|
||||||
{
|
{
|
||||||
return &this->emotes;
|
return &this->emotes;
|
||||||
}
|
}
|
||||||
@@ -81,7 +81,7 @@ public:
|
|||||||
|
|
||||||
mock::EmptyLogging logging;
|
mock::EmptyLogging logging;
|
||||||
AccountController accounts;
|
AccountController accounts;
|
||||||
mock::Emotes emotes;
|
mock::EmoteController emotes;
|
||||||
mock::UserDataController userData;
|
mock::UserDataController userData;
|
||||||
mock::MockTwitchIrcServer twitch;
|
mock::MockTwitchIrcServer twitch;
|
||||||
mock::ChatterinoBadges chatterinoBadges;
|
mock::ChatterinoBadges chatterinoBadges;
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
#include "controllers/accounts/AccountController.hpp"
|
#include "controllers/accounts/AccountController.hpp"
|
||||||
#include "mocks/BaseApplication.hpp"
|
#include "mocks/BaseApplication.hpp"
|
||||||
#include "mocks/Emotes.hpp"
|
#include "mocks/EmoteController.hpp"
|
||||||
|
#include "providers/twitch/TwitchEmotes.hpp"
|
||||||
#include "providers/twitch/TwitchIrc.hpp"
|
#include "providers/twitch/TwitchIrc.hpp"
|
||||||
#include "Test.hpp"
|
#include "Test.hpp"
|
||||||
|
|
||||||
@@ -15,7 +16,7 @@ class MockApplication : public mock::BaseApplication
|
|||||||
public:
|
public:
|
||||||
MockApplication() = default;
|
MockApplication() = default;
|
||||||
|
|
||||||
IEmotes *getEmotes() override
|
EmoteController *getEmotes() override
|
||||||
{
|
{
|
||||||
return &this->emotes;
|
return &this->emotes;
|
||||||
}
|
}
|
||||||
@@ -25,7 +26,7 @@ public:
|
|||||||
return &this->accounts;
|
return &this->accounts;
|
||||||
}
|
}
|
||||||
|
|
||||||
mock::Emotes emotes;
|
mock::EmoteController emotes;
|
||||||
AccountController accounts;
|
AccountController accounts;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -8,11 +8,10 @@
|
|||||||
#include "messages/Emote.hpp"
|
#include "messages/Emote.hpp"
|
||||||
#include "mocks/BaseApplication.hpp"
|
#include "mocks/BaseApplication.hpp"
|
||||||
#include "mocks/Channel.hpp"
|
#include "mocks/Channel.hpp"
|
||||||
#include "mocks/Emotes.hpp"
|
#include "mocks/EmoteController.hpp"
|
||||||
#include "mocks/Helix.hpp"
|
#include "mocks/Helix.hpp"
|
||||||
#include "mocks/Logging.hpp"
|
#include "mocks/Logging.hpp"
|
||||||
#include "mocks/TwitchIrcServer.hpp"
|
#include "mocks/TwitchIrcServer.hpp"
|
||||||
#include "singletons/Emotes.hpp"
|
|
||||||
#include "singletons/Paths.hpp"
|
#include "singletons/Paths.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
#include "Test.hpp"
|
#include "Test.hpp"
|
||||||
@@ -52,7 +51,7 @@ public:
|
|||||||
return &this->twitch;
|
return &this->twitch;
|
||||||
}
|
}
|
||||||
|
|
||||||
IEmotes *getEmotes() override
|
EmoteController *getEmotes() override
|
||||||
{
|
{
|
||||||
return &this->emotes;
|
return &this->emotes;
|
||||||
}
|
}
|
||||||
@@ -80,7 +79,7 @@ public:
|
|||||||
mock::EmptyLogging logging;
|
mock::EmptyLogging logging;
|
||||||
AccountController accounts;
|
AccountController accounts;
|
||||||
mock::MockTwitchIrcServer twitch;
|
mock::MockTwitchIrcServer twitch;
|
||||||
mock::Emotes emotes;
|
mock::EmoteController emotes;
|
||||||
BttvEmotes bttvEmotes;
|
BttvEmotes bttvEmotes;
|
||||||
FfzEmotes ffzEmotes;
|
FfzEmotes ffzEmotes;
|
||||||
SeventvEmotes seventvEmotes;
|
SeventvEmotes seventvEmotes;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
#include "mocks/BaseApplication.hpp"
|
#include "mocks/BaseApplication.hpp"
|
||||||
#include "mocks/ChatterinoBadges.hpp"
|
#include "mocks/ChatterinoBadges.hpp"
|
||||||
#include "mocks/DisabledStreamerMode.hpp"
|
#include "mocks/DisabledStreamerMode.hpp"
|
||||||
#include "mocks/Emotes.hpp"
|
#include "mocks/EmoteController.hpp"
|
||||||
#include "mocks/LinkResolver.hpp"
|
#include "mocks/LinkResolver.hpp"
|
||||||
#include "mocks/Logging.hpp"
|
#include "mocks/Logging.hpp"
|
||||||
#include "mocks/TwitchIrcServer.hpp"
|
#include "mocks/TwitchIrcServer.hpp"
|
||||||
@@ -24,7 +24,6 @@
|
|||||||
#include "providers/twitch/TwitchBadge.hpp"
|
#include "providers/twitch/TwitchBadge.hpp"
|
||||||
#include "providers/twitch/TwitchBadges.hpp"
|
#include "providers/twitch/TwitchBadges.hpp"
|
||||||
#include "providers/twitch/TwitchChannel.hpp"
|
#include "providers/twitch/TwitchChannel.hpp"
|
||||||
#include "singletons/Emotes.hpp"
|
|
||||||
#include "Test.hpp"
|
#include "Test.hpp"
|
||||||
#include "util/IrcHelpers.hpp"
|
#include "util/IrcHelpers.hpp"
|
||||||
#include "util/VectorMessageSink.hpp"
|
#include "util/VectorMessageSink.hpp"
|
||||||
@@ -72,7 +71,7 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
IEmotes *getEmotes() override
|
EmoteController *getEmotes() override
|
||||||
{
|
{
|
||||||
return &this->emotes;
|
return &this->emotes;
|
||||||
}
|
}
|
||||||
@@ -149,7 +148,7 @@ public:
|
|||||||
|
|
||||||
mock::EmptyLogging logging;
|
mock::EmptyLogging logging;
|
||||||
AccountController accounts;
|
AccountController accounts;
|
||||||
mock::Emotes emotes;
|
mock::EmoteController emotes;
|
||||||
mock::UserDataController userData;
|
mock::UserDataController userData;
|
||||||
mock::MockTwitchIrcServer twitch;
|
mock::MockTwitchIrcServer twitch;
|
||||||
mock::ChatterinoBadges chatterinoBadges;
|
mock::ChatterinoBadges chatterinoBadges;
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
#include "messages/MessageBuilder.hpp"
|
#include "messages/MessageBuilder.hpp"
|
||||||
#include "messages/MessageElement.hpp"
|
#include "messages/MessageElement.hpp"
|
||||||
#include "mocks/BaseApplication.hpp"
|
#include "mocks/BaseApplication.hpp"
|
||||||
#include "singletons/Emotes.hpp"
|
|
||||||
#include "singletons/Fonts.hpp"
|
#include "singletons/Fonts.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
#include "singletons/Theme.hpp"
|
#include "singletons/Theme.hpp"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "messages/Image.hpp"
|
#include "messages/Image.hpp"
|
||||||
#include "mocks/BaseApplication.hpp"
|
#include "mocks/BaseApplication.hpp"
|
||||||
#include "mocks/Emotes.hpp"
|
#include "mocks/EmoteController.hpp"
|
||||||
#include "singletons/Resources.hpp"
|
#include "singletons/Resources.hpp"
|
||||||
#include "Test.hpp"
|
#include "Test.hpp"
|
||||||
|
|
||||||
@@ -19,12 +19,12 @@ class MockApplication : public mock::BaseApplication
|
|||||||
public:
|
public:
|
||||||
MockApplication() = default;
|
MockApplication() = default;
|
||||||
|
|
||||||
IEmotes *getEmotes() override
|
EmoteController *getEmotes() override
|
||||||
{
|
{
|
||||||
return &this->emotes;
|
return &this->emotes;
|
||||||
}
|
}
|
||||||
|
|
||||||
mock::Emotes emotes;
|
mock::EmoteController emotes;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ModerationActionTest : public ::testing::Test
|
class ModerationActionTest : public ::testing::Test
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
# include "messages/Message.hpp"
|
# include "messages/Message.hpp"
|
||||||
# include "mocks/BaseApplication.hpp"
|
# include "mocks/BaseApplication.hpp"
|
||||||
# include "mocks/Channel.hpp"
|
# include "mocks/Channel.hpp"
|
||||||
# include "mocks/Emotes.hpp"
|
# include "mocks/EmoteController.hpp"
|
||||||
# include "mocks/Logging.hpp"
|
# include "mocks/Logging.hpp"
|
||||||
# include "mocks/TwitchIrcServer.hpp"
|
# include "mocks/TwitchIrcServer.hpp"
|
||||||
# include "NetworkHelpers.hpp"
|
# include "NetworkHelpers.hpp"
|
||||||
@@ -92,7 +92,7 @@ public:
|
|||||||
return &this->commands;
|
return &this->commands;
|
||||||
}
|
}
|
||||||
|
|
||||||
IEmotes *getEmotes() override
|
EmoteController *getEmotes() override
|
||||||
{
|
{
|
||||||
return &this->emotes;
|
return &this->emotes;
|
||||||
}
|
}
|
||||||
@@ -110,7 +110,7 @@ public:
|
|||||||
PluginController plugins;
|
PluginController plugins;
|
||||||
mock::Logging logging;
|
mock::Logging logging;
|
||||||
CommandController commands;
|
CommandController commands;
|
||||||
mock::Emotes emotes;
|
mock::EmoteController emotes;
|
||||||
MockTwitch twitch;
|
MockTwitch twitch;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#include "controllers/commands/CommandController.hpp"
|
#include "controllers/commands/CommandController.hpp"
|
||||||
#include "controllers/hotkeys/HotkeyController.hpp"
|
#include "controllers/hotkeys/HotkeyController.hpp"
|
||||||
#include "mocks/BaseApplication.hpp"
|
#include "mocks/BaseApplication.hpp"
|
||||||
#include "mocks/Emotes.hpp"
|
#include "mocks/EmoteController.hpp"
|
||||||
#include "singletons/Fonts.hpp"
|
#include "singletons/Fonts.hpp"
|
||||||
#include "singletons/Paths.hpp"
|
#include "singletons/Paths.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
@@ -54,7 +54,7 @@ public:
|
|||||||
return &this->commands;
|
return &this->commands;
|
||||||
}
|
}
|
||||||
|
|
||||||
IEmotes *getEmotes() override
|
EmoteController *getEmotes() override
|
||||||
{
|
{
|
||||||
return &this->emotes;
|
return &this->emotes;
|
||||||
}
|
}
|
||||||
@@ -63,7 +63,7 @@ public:
|
|||||||
WindowManager windowManager;
|
WindowManager windowManager;
|
||||||
AccountController accounts;
|
AccountController accounts;
|
||||||
CommandController commands;
|
CommandController commands;
|
||||||
mock::Emotes emotes;
|
mock::EmoteController emotes;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SplitInputTest
|
class SplitInputTest
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
#include "providers/twitch/TwitchIrc.hpp"
|
#include "providers/twitch/TwitchIrc.hpp"
|
||||||
|
|
||||||
#include "mocks/BaseApplication.hpp"
|
#include "mocks/BaseApplication.hpp"
|
||||||
#include "mocks/Emotes.hpp"
|
#include "mocks/EmoteController.hpp"
|
||||||
#include "providers/twitch/TwitchBadge.hpp"
|
#include "providers/twitch/TwitchBadge.hpp"
|
||||||
|
#include "providers/twitch/TwitchEmotes.hpp"
|
||||||
#include "Test.hpp"
|
#include "Test.hpp"
|
||||||
#include "util/IrcHelpers.hpp"
|
#include "util/IrcHelpers.hpp"
|
||||||
|
|
||||||
@@ -15,12 +16,12 @@ class MockApplication : public mock::BaseApplication
|
|||||||
public:
|
public:
|
||||||
MockApplication() = default;
|
MockApplication() = default;
|
||||||
|
|
||||||
IEmotes *getEmotes() override
|
EmoteController *getEmotes() override
|
||||||
{
|
{
|
||||||
return &this->emotes;
|
return &this->emotes;
|
||||||
}
|
}
|
||||||
|
|
||||||
mock::Emotes emotes;
|
mock::EmoteController emotes;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
Reference in New Issue
Block a user