diff --git a/src/providers/twitch/ChatroomChannel.cpp b/src/providers/twitch/ChatroomChannel.cpp index d2f08d82c..5f393e427 100644 --- a/src/providers/twitch/ChatroomChannel.cpp +++ b/src/providers/twitch/ChatroomChannel.cpp @@ -55,7 +55,7 @@ void ChatroomChannel::refreshFFZChannelEmotes() std::make_shared(std::move(emoteMap))); }, [this](auto &&modBadge) { - this->ffzCustomModBadge_ = std::move(modBadge); + this->ffzCustomModBadge_.set(std::move(modBadge)); }); } diff --git a/src/providers/twitch/TwitchChannel.cpp b/src/providers/twitch/TwitchChannel.cpp index 379d3aed4..a165981d7 100644 --- a/src/providers/twitch/TwitchChannel.cpp +++ b/src/providers/twitch/TwitchChannel.cpp @@ -171,7 +171,7 @@ void TwitchChannel::refreshFFZChannelEmotes() [this, weak = weakOf(this)](auto &&modBadge) { if (auto shared = weak.lock()) { - this->ffzCustomModBadge_ = std::move(modBadge); + this->ffzCustomModBadge_.set(std::move(modBadge)); } }); } @@ -829,7 +829,7 @@ boost::optional TwitchChannel::twitchBadge( boost::optional TwitchChannel::ffzCustomModBadge() const { - return this->ffzCustomModBadge_; + return this->ffzCustomModBadge_.get(); } } // namespace chatterino diff --git a/src/providers/twitch/TwitchChannel.hpp b/src/providers/twitch/TwitchChannel.hpp index d582d7a79..df54dee5f 100644 --- a/src/providers/twitch/TwitchChannel.hpp +++ b/src/providers/twitch/TwitchChannel.hpp @@ -147,7 +147,7 @@ protected: FfzEmotes &globalFfz_; Atomic> bttvEmotes_; Atomic> ffzEmotes_; - boost::optional ffzCustomModBadge_; + Atomic> ffzCustomModBadge_; private: // Badges