Skip to content

Commit

Permalink
fix: emote menu broken due to twitch change (#649)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnatoleAM authored May 30, 2023
1 parent 5548b67 commit d2d67a7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-nightly.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- Emote Menu
- 7TV Paints & Badges
- Fixed an issue which caused mod icons to be invisible
- Fixed an issue where the emote menu button was broken due to a recent Twitch change
- Fixed an issue which sometimes caused channel emote sets to disappear
- Fixed an issue which caused stylesheets to be duplicated when running in hosted mode

Expand Down
3 changes: 2 additions & 1 deletion src/app/emote-menu/EmoteMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
@emote-clicked="emit('emote-click', $event)"
@provider-visible="onProviderVisibilityChange(key, $event)"
@toggle-settings="settingsContext.toggle()"
@toggle-native-menu="toggle()"
@toggle-native-menu="[toggle(), emit('toggle-native-menu')]"
/>
</div>
</div>
Expand Down Expand Up @@ -76,6 +76,7 @@ const props = defineProps<{
const emit = defineEmits<{
(e: "emote-click", emote: SevenTV.ActiveEmote): void;
(e: "toggle-native-menu"): void;
(e: "close", ev: MouseEvent): void;
}>();
Expand Down
8 changes: 4 additions & 4 deletions src/site/twitch.tv/modules/emote-menu/EmoteMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
scale="1rem"
:instance="props.instance"
@emote-click="onEmoteClick($event)"
@toggle-native-menu="toggle(true)"
@close="onClose"
/>
</div>
Expand Down Expand Up @@ -89,17 +90,16 @@ function toggle(native?: boolean) {
const t = props.instance.component;
if (native) {
t.onEmotePickerButtonClick();
ctx.open = false;
return;
}
if (ctx.open) {
t.props.closeEmotePicker();
} else {
t.props.clearMenus();
t.closeBitsCard();
t.closePaidPinnedChatCardForEmotePicker();
t.closeCheerCard();
if (typeof t.closeBitsCard === "function") t.closeBitsCard();
if (typeof t.closePaidPinnedChatCardForEmotePicker === "function") t.closePaidPinnedChatCardForEmotePicker();
if (typeof t.closeCheerCard === "function") t.closeCheerCard();
}
ctx.open = !ctx.open;
Expand Down

0 comments on commit d2d67a7

Please sign in to comment.