Add setting to disable custom ffz mod/VIP badges (#2759)

Co-authored-by: Paweł <zneix@zneix.eu>
This commit is contained in:
Tal Neoran
2021-05-16 23:07:12 +03:00
committed by GitHub
parent 80506a8625
commit 2db50f1c41
4 changed files with 14 additions and 2 deletions
+2
View File
@@ -2,6 +2,8 @@
## Unversioned ## Unversioned
- Minor: Added settings to disable custom FrankerFaceZ VIP/mod badges. (#2693, #2759)
## 2.3.2 ## 2.3.2
- Major: New split for channels going live! /live. (#1797) - Major: New split for channels going live! /live. (#1797)
@@ -1116,7 +1116,8 @@ void TwitchMessageBuilder::appendTwitchBadges()
const auto &cheerAmount = badge.value_; const auto &cheerAmount = badge.value_;
tooltip = QString("Twitch cheer %0").arg(cheerAmount); tooltip = QString("Twitch cheer %0").arg(cheerAmount);
} }
else if (badge.key_ == "moderator") else if (badge.key_ == "moderator" &&
getSettings()->useCustomFfzModeratorBadges)
{ {
if (auto customModBadge = this->twitchChannel->ffzCustomModBadge()) if (auto customModBadge = this->twitchChannel->ffzCustomModBadge())
{ {
@@ -1128,7 +1129,7 @@ void TwitchMessageBuilder::appendTwitchBadges()
continue; continue;
} }
} }
else if (badge.key_ == "vip") else if (badge.key_ == "vip" && getSettings()->useCustomFfzVipBadges)
{ {
if (auto customVipBadge = this->twitchChannel->ffzCustomVipBadge()) if (auto customVipBadge = this->twitchChannel->ffzCustomVipBadge())
{ {
+4
View File
@@ -133,6 +133,10 @@ public:
BoolSetting showBadgesVanity = {"/appearance/badges/vanity", true}; BoolSetting showBadgesVanity = {"/appearance/badges/vanity", true};
BoolSetting showBadgesChatterino = {"/appearance/badges/chatterino", true}; BoolSetting showBadgesChatterino = {"/appearance/badges/chatterino", true};
BoolSetting showBadgesFfz = {"/appearance/badges/ffz", true}; BoolSetting showBadgesFfz = {"/appearance/badges/ffz", true};
BoolSetting useCustomFfzModeratorBadges = {
"/appearance/badges/useCustomFfzModeratorBadges", true};
BoolSetting useCustomFfzVipBadges = {
"/appearance/badges/useCustomFfzVipBadges", true};
/// Behaviour /// Behaviour
BoolSetting allowDuplicateMessages = {"/behaviour/allowDuplicateMessages", BoolSetting allowDuplicateMessages = {"/behaviour/allowDuplicateMessages",
@@ -570,6 +570,11 @@ void GeneralPage::initLayout(GeneralPageView &layout)
layout.addCheckbox("Chatterino", s.showBadgesChatterino); layout.addCheckbox("Chatterino", s.showBadgesChatterino);
layout.addCheckbox("FrankerFaceZ (Bot, FFZ Supporter, FFZ Developer)", layout.addCheckbox("FrankerFaceZ (Bot, FFZ Supporter, FFZ Developer)",
s.showBadgesFfz); s.showBadgesFfz);
layout.addSeperator();
layout.addCheckbox("Use custom FrankerFaceZ moderator badges",
s.useCustomFfzModeratorBadges);
layout.addCheckbox("Use custom FrankerFaceZ VIP badges",
s.useCustomFfzVipBadges);
layout.addSubtitle("Miscellaneous"); layout.addSubtitle("Miscellaneous");