Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 8 commits into from
May 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unversioned

- Minor: Added settings to disable custom FrankerFaceZ VIP/mod badges. (#2693, #2759)

## 2.3.2

- Major: New split for channels going live! /live. (#1797)
Expand Down
5 changes: 3 additions & 2 deletions src/providers/twitch/TwitchMessageBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,8 @@ void TwitchMessageBuilder::appendTwitchBadges()
const auto &cheerAmount = badge.value_;
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())
{
Expand All @@ -1128,7 +1129,7 @@ void TwitchMessageBuilder::appendTwitchBadges()
continue;
}
}
else if (badge.key_ == "vip")
else if (badge.key_ == "vip" && getSettings()->useCustomFfzVipBadges)
{
if (auto customVipBadge = this->twitchChannel->ffzCustomVipBadge())
{
Expand Down
4 changes: 4 additions & 0 deletions src/singletons/Settings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ class Settings : public ABSettings, public ConcurrentSettings
BoolSetting showBadgesVanity = {"/appearance/badges/vanity", true};
BoolSetting showBadgesChatterino = {"/appearance/badges/chatterino", true};
BoolSetting showBadgesFfz = {"/appearance/badges/ffz", true};
BoolSetting useCustomFfzModeratorBadges = {
"/appearance/badges/useCustomFfzModeratorBadges", true};
BoolSetting useCustomFfzVipBadges = {
"/appearance/badges/useCustomFfzVipBadges", true};

/// Behaviour
BoolSetting allowDuplicateMessages = {"/behaviour/allowDuplicateMessages",
Expand Down
5 changes: 5 additions & 0 deletions src/widgets/settingspages/GeneralPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,11 @@ void GeneralPage::initLayout(GeneralPageView &layout)
layout.addCheckbox("Chatterino", s.showBadgesChatterino);
layout.addCheckbox("FrankerFaceZ (Bot, FFZ Supporter, FFZ Developer)",
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");

Expand Down