mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
fix: global emotes not loading (#5435)
* fix: manually initialize twitchircserver after rest of singletons are initialized this fixes global emotes not being loaded on startup, since initialize was never called (since it was no longer added to the singleton list) * unrelated nit: remove copy/move ctors/operators of twitchircserver
This commit is contained in:
parent
d00cadf4eb
commit
248cd46eb7
|
@ -19,7 +19,7 @@
|
||||||
- Dev: Add doxygen build target. (#5377)
|
- Dev: Add doxygen build target. (#5377)
|
||||||
- Dev: Make printing of strings in tests easier. (#5379)
|
- Dev: Make printing of strings in tests easier. (#5379)
|
||||||
- Dev: Refactor and document `Scrollbar`. (#5334, #5393)
|
- Dev: Refactor and document `Scrollbar`. (#5334, #5393)
|
||||||
- Dev: Refactor `TwitchIrcServer`, making it abstracted. (#5421)
|
- Dev: Refactor `TwitchIrcServer`, making it abstracted. (#5421, #5435)
|
||||||
- Dev: Reduced the amount of scale events. (#5404, #5406)
|
- Dev: Reduced the amount of scale events. (#5404, #5406)
|
||||||
- Dev: Removed unused timegate settings. (#5361)
|
- Dev: Removed unused timegate settings. (#5361)
|
||||||
- Dev: All Lua globals now show in the `c2` global in the LuaLS metadata. (#5385)
|
- Dev: All Lua globals now show in the `c2` global in the LuaLS metadata. (#5385)
|
||||||
|
|
|
@ -211,6 +211,8 @@ void Application::initialize(Settings &settings, const Paths &paths)
|
||||||
singleton->initialize(settings, paths);
|
singleton->initialize(settings, paths);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this->twitch->initialize();
|
||||||
|
|
||||||
// XXX: Loading Twitch badges after Helix has been initialized, which only happens after
|
// XXX: Loading Twitch badges after Helix has been initialized, which only happens after
|
||||||
// the AccountController initialize has been called
|
// the AccountController initialize has been called
|
||||||
this->twitchBadges->loadTwitchBadges();
|
this->twitchBadges->loadTwitchBadges();
|
||||||
|
|
|
@ -165,7 +165,7 @@ TwitchIrcServer::TwitchIrcServer()
|
||||||
// false);
|
// false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TwitchIrcServer::initialize(Settings &settings, const Paths &paths)
|
void TwitchIrcServer::initialize()
|
||||||
{
|
{
|
||||||
getIApp()->getAccounts()->twitch.currentUserChanged.connect([this]() {
|
getIApp()->getAccounts()->twitch.currentUserChanged.connect([this]() {
|
||||||
postToThread([this] {
|
postToThread([this] {
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
#include "common/Atomic.hpp"
|
#include "common/Atomic.hpp"
|
||||||
#include "common/Channel.hpp"
|
#include "common/Channel.hpp"
|
||||||
#include "common/Singleton.hpp"
|
|
||||||
#include "providers/irc/AbstractIrcServer.hpp"
|
#include "providers/irc/AbstractIrcServer.hpp"
|
||||||
|
|
||||||
#include <pajlada/signals/signalholder.hpp>
|
#include <pajlada/signals/signalholder.hpp>
|
||||||
|
@ -52,15 +51,18 @@ public:
|
||||||
// Update this interface with TwitchIrcServer methods as needed
|
// Update this interface with TwitchIrcServer methods as needed
|
||||||
};
|
};
|
||||||
|
|
||||||
class TwitchIrcServer final : public AbstractIrcServer,
|
class TwitchIrcServer final : public AbstractIrcServer, public ITwitchIrcServer
|
||||||
public Singleton,
|
|
||||||
public ITwitchIrcServer
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TwitchIrcServer();
|
TwitchIrcServer();
|
||||||
~TwitchIrcServer() override = default;
|
~TwitchIrcServer() override = default;
|
||||||
|
|
||||||
void initialize(Settings &settings, const Paths &paths) override;
|
TwitchIrcServer(const TwitchIrcServer &) = delete;
|
||||||
|
TwitchIrcServer(TwitchIrcServer &&) = delete;
|
||||||
|
TwitchIrcServer &operator=(const TwitchIrcServer &) = delete;
|
||||||
|
TwitchIrcServer &operator=(TwitchIrcServer &&) = delete;
|
||||||
|
|
||||||
|
void initialize();
|
||||||
|
|
||||||
void forEachChannelAndSpecialChannels(
|
void forEachChannelAndSpecialChannels(
|
||||||
std::function<void(ChannelPtr)> func) override;
|
std::function<void(ChannelPtr)> func) override;
|
||||||
|
|
Loading…
Reference in a new issue