Skip to content

Commit

Permalink
feat: Added option to hide 7TV badges in chat (#1048)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisScr3ams committed Jun 19, 2024
1 parent 1a39453 commit bf25d3d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG-nightly.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Fixed an issue where twitch emotes were displayed larger after hovering over them
- Fixed an issue causing VOD messages to display two timestamps
- Added option to hide 7TV badges from chat

### 3.1.0.3000

Expand Down
3 changes: 2 additions & 1 deletion src/app/chat/UserTag.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ const ctx = useChannelContext();
const properties = useChatProperties(ctx);
const cosmetics = useCosmetics(props.user.id);
const shouldRenderPaint = useConfig("vanity.nametag_paints");
const shouldRender7tvBadges = useConfig("vanity.7tv_Badges");
const betterUserCardEnabled = useConfig("chat.user_card");
const twitchBadges = ref<Twitch.ChatBadge[]>([]);
const twitchBadgeSets = toRef(properties, "twitchBadgeSets");
Expand Down Expand Up @@ -133,7 +134,7 @@ const stop = watch(
}
paint.value = shouldRenderPaint.value && paints && paints.size ? paints.values().next().value : null;
activeBadges.value = [...badges.values()];
activeBadges.value = shouldRender7tvBadges.value && badges && badges.size ? [...badges.values()] : [];
},
{ immediate: true },
);
Expand Down
6 changes: 6 additions & 0 deletions src/site/twitch.tv/modules/chat/ChatModule.vue
Original file line number Diff line number Diff line change
Expand Up @@ -478,5 +478,11 @@ export const config = [
hint: "Whether or not to display nametag paints",
defaultValue: true,
}),
declareConfig<boolean>("vanity.7tv_Badges", "TOGGLE", {
path: ["Appearance", "Vanity"],
label: "7TV Badges",
hint: "Whether or not to display 7TV Badges",
defaultValue: true,
}),
];
</script>

0 comments on commit bf25d3d

Please sign in to comment.