Add ability to hide Twitch Prediction badges (#2668)
We now properly categorize the Twitch `predictions` badges since they take up their own slot in Twitch web chat
This commit is contained in:
@@ -7,6 +7,7 @@ namespace chatterino {
|
||||
// set of badge IDs that should be given specific flags.
|
||||
// vanity flag is left out on purpose as it is our default flag
|
||||
const QSet<QString> globalAuthority{"staff", "admin", "global_mod"};
|
||||
const QSet<QString> predictions{"predictions"};
|
||||
const QSet<QString> channelAuthority{"moderator", "vip", "broadcaster"};
|
||||
const QSet<QString> subBadges{"subscriber", "founder"};
|
||||
|
||||
@@ -18,6 +19,10 @@ Badge::Badge(QString key, QString value)
|
||||
{
|
||||
this->flag_ = MessageElementFlag::BadgeGlobalAuthority;
|
||||
}
|
||||
else if (predictions.contains(this->key_))
|
||||
{
|
||||
this->flag_ = MessageElementFlag::BadgePredictions;
|
||||
}
|
||||
else if (channelAuthority.contains(this->key_))
|
||||
{
|
||||
this->flag_ = MessageElementFlag::BadgeChannelAuthority;
|
||||
|
||||
Reference in New Issue
Block a user