custom ffz moderator badges (#827)

This commit is contained in:
pphop
2018-10-26 00:53:03 +05:00
committed by fourtf
parent c13a88e3b6
commit 3c9bcd581a
6 changed files with 136 additions and 3 deletions
+10
View File
@@ -91,6 +91,7 @@ TwitchChannel::TwitchChannel(const QString &name,
, globalFfz_(ffz)
, bttvEmotes_(std::make_shared<EmoteMap>())
, ffzEmotes_(std::make_shared<EmoteMap>())
, ffzCustomModBadge_(name)
, mod_(false)
{
log("[TwitchChannel:{}] Opened", name);
@@ -143,6 +144,7 @@ void TwitchChannel::initialize()
{
this->refreshChatters();
this->refreshChannelEmotes();
this->ffzCustomModBadge_.loadCustomModBadge();
}
bool TwitchChannel::isEmpty() const
@@ -783,4 +785,12 @@ boost::optional<EmotePtr> TwitchChannel::twitchBadge(
return boost::none;
}
boost::optional<EmotePtr> TwitchChannel::ffzCustomModBadge() const
{
if (auto badge = this->ffzCustomModBadge_.badge())
return badge;
return boost::none;
}
} // namespace chatterino