diff --git a/package.json b/package.json index aa996fbe..f1dcabf6 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "frankerfacez", "author": "Dan Salvato LLC", - "version": "4.17.5", + "version": "4.17.6", "description": "FrankerFaceZ is a Twitch enhancement suite.", "license": "Apache-2.0", "scripts": { diff --git a/src/experiments.json b/src/experiments.json index c65bfa4d..51ebd3b1 100644 --- a/src/experiments.json +++ b/src/experiments.json @@ -3,8 +3,8 @@ "name": "New API Stress Testing", "description": "Send duplicate requests to the new API server for load testing.", "groups": [ - {"value": true, "weight": 50}, - {"value": false, "weight": 50} + {"value": true, "weight": 75}, + {"value": false, "weight": 25} ] } } \ No newline at end of file diff --git a/src/sites/twitch-twilight/modules/chat/emote_menu.jsx b/src/sites/twitch-twilight/modules/chat/emote_menu.jsx index d686b895..362bc3f2 100644 --- a/src/sites/twitch-twilight/modules/chat/emote_menu.jsx +++ b/src/sites/twitch-twilight/modules/chat/emote_menu.jsx @@ -237,7 +237,6 @@ export default class EmoteMenu extends Module { this.on('chat.emotes:update-default-sets', this.maybeUpdate, this); this.on('chat.emotes:update-user-sets', this.maybeUpdate, this); this.on('chat.emotes:update-room-sets', this.maybeUpdate, this); - this.on('chat.emotes:change-favorite', this.updateFavorite, this); this.on('chat.emoji:populated', this.updateEmoji, this); this.chat.context.on('changed:chat.emote-menu.enabled', () => @@ -933,16 +932,25 @@ export default class EmoteMenu extends Module { if ( this.ref ) this.createObserver(); + t.on('chat.emotes:change-favorite', this.updateFavorites, this); + window.ffz_menu = this; } componentWillUnmount() { this.destroyObserver(); + t.off('chat.emotes:change-favorite', this.updateFavorites, this); + if ( window.ffz_menu === this ) window.ffz_menu = null; } + updateFavorites() { + const state = this.buildState(this.props, this.state); + this.setState(this.filterState(state.filter, state)); + } + pickTone(tone) { tone = tone || null; t.settings.provider.set('emoji-tone', tone); diff --git a/src/sites/twitch-twilight/modules/chat/input.jsx b/src/sites/twitch-twilight/modules/chat/input.jsx index 6449a0d2..ccf5e3ae 100644 --- a/src/sites/twitch-twilight/modules/chat/input.jsx +++ b/src/sites/twitch-twilight/modules/chat/input.jsx @@ -459,7 +459,7 @@ export default class Input extends Module { if (set && Array.isArray(set.emotes)) { for (const emote of set.emotes) { if (inst.doesEmoteMatchTerm(emote, search)) { - const favorite = favorites.includes(parseInt(emote.id, 10)); + const favorite = favorites.includes(emote.id); const element = { current: input, replacement: emote.token,