make ffz custom mod badge atomic
This commit is contained in:
@@ -55,7 +55,7 @@ void ChatroomChannel::refreshFFZChannelEmotes()
|
|||||||
std::make_shared<EmoteMap>(std::move(emoteMap)));
|
std::make_shared<EmoteMap>(std::move(emoteMap)));
|
||||||
},
|
},
|
||||||
[this](auto &&modBadge) {
|
[this](auto &&modBadge) {
|
||||||
this->ffzCustomModBadge_ = std::move(modBadge);
|
this->ffzCustomModBadge_.set(std::move(modBadge));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ void TwitchChannel::refreshFFZChannelEmotes()
|
|||||||
[this, weak = weakOf<Channel>(this)](auto &&modBadge) {
|
[this, weak = weakOf<Channel>(this)](auto &&modBadge) {
|
||||||
if (auto shared = weak.lock())
|
if (auto shared = weak.lock())
|
||||||
{
|
{
|
||||||
this->ffzCustomModBadge_ = std::move(modBadge);
|
this->ffzCustomModBadge_.set(std::move(modBadge));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -829,7 +829,7 @@ boost::optional<EmotePtr> TwitchChannel::twitchBadge(
|
|||||||
|
|
||||||
boost::optional<EmotePtr> TwitchChannel::ffzCustomModBadge() const
|
boost::optional<EmotePtr> TwitchChannel::ffzCustomModBadge() const
|
||||||
{
|
{
|
||||||
return this->ffzCustomModBadge_;
|
return this->ffzCustomModBadge_.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace chatterino
|
} // namespace chatterino
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ protected:
|
|||||||
FfzEmotes &globalFfz_;
|
FfzEmotes &globalFfz_;
|
||||||
Atomic<std::shared_ptr<const EmoteMap>> bttvEmotes_;
|
Atomic<std::shared_ptr<const EmoteMap>> bttvEmotes_;
|
||||||
Atomic<std::shared_ptr<const EmoteMap>> ffzEmotes_;
|
Atomic<std::shared_ptr<const EmoteMap>> ffzEmotes_;
|
||||||
boost::optional<EmotePtr> ffzCustomModBadge_;
|
Atomic<boost::optional<EmotePtr>> ffzCustomModBadge_;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Badges
|
// Badges
|
||||||
|
|||||||
Reference in New Issue
Block a user