Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: global emotes not loading #5435

Merged
merged 3 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
- Dev: Add doxygen build target. (#5377)
- Dev: Make printing of strings in tests easier. (#5379)
- 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: Removed unused timegate settings. (#5361)
- Dev: All Lua globals now show in the `c2` global in the LuaLS metadata. (#5385)
Expand Down
2 changes: 2 additions & 0 deletions src/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ void Application::initialize(Settings &settings, const Paths &paths)
singleton->initialize(settings, paths);
}

this->twitch->initialize();

// XXX: Loading Twitch badges after Helix has been initialized, which only happens after
// the AccountController initialize has been called
this->twitchBadges->loadTwitchBadges();
Expand Down
2 changes: 1 addition & 1 deletion src/providers/twitch/TwitchIrcServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ TwitchIrcServer::TwitchIrcServer()
// false);
}

void TwitchIrcServer::initialize(Settings &settings, const Paths &paths)
void TwitchIrcServer::initialize()
{
getIApp()->getAccounts()->twitch.currentUserChanged.connect([this]() {
postToThread([this] {
Expand Down
12 changes: 7 additions & 5 deletions src/providers/twitch/TwitchIrcServer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include "common/Atomic.hpp"
#include "common/Channel.hpp"
#include "common/Singleton.hpp"
#include "providers/irc/AbstractIrcServer.hpp"

#include <pajlada/signals/signalholder.hpp>
Expand Down Expand Up @@ -52,15 +51,18 @@ class ITwitchIrcServer
// Update this interface with TwitchIrcServer methods as needed
};

class TwitchIrcServer final : public AbstractIrcServer,
public Singleton,
public ITwitchIrcServer
class TwitchIrcServer final : public AbstractIrcServer, public ITwitchIrcServer
{
public:
TwitchIrcServer();
~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(
std::function<void(ChannelPtr)> func) override;
Expand Down
Loading