1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-16 18:06:55 +00:00
* Fixed: Favorite Twitch emotes not being sorted correctly for tab-completion.
* Fixed: Favoriting an emote not updating the FFZ emote menu.
This commit is contained in:
SirStendec 2019-12-13 14:17:33 -05:00
parent 3ff9895713
commit 4f0144ed71
4 changed files with 13 additions and 5 deletions

View file

@ -1,7 +1,7 @@
{ {
"name": "frankerfacez", "name": "frankerfacez",
"author": "Dan Salvato LLC", "author": "Dan Salvato LLC",
"version": "4.17.5", "version": "4.17.6",
"description": "FrankerFaceZ is a Twitch enhancement suite.", "description": "FrankerFaceZ is a Twitch enhancement suite.",
"license": "Apache-2.0", "license": "Apache-2.0",
"scripts": { "scripts": {

View file

@ -3,8 +3,8 @@
"name": "New API Stress Testing", "name": "New API Stress Testing",
"description": "Send duplicate requests to the new API server for load testing.", "description": "Send duplicate requests to the new API server for load testing.",
"groups": [ "groups": [
{"value": true, "weight": 50}, {"value": true, "weight": 75},
{"value": false, "weight": 50} {"value": false, "weight": 25}
] ]
} }
} }

View file

@ -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-default-sets', this.maybeUpdate, this);
this.on('chat.emotes:update-user-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:update-room-sets', this.maybeUpdate, this);
this.on('chat.emotes:change-favorite', this.updateFavorite, this);
this.on('chat.emoji:populated', this.updateEmoji, this); this.on('chat.emoji:populated', this.updateEmoji, this);
this.chat.context.on('changed:chat.emote-menu.enabled', () => this.chat.context.on('changed:chat.emote-menu.enabled', () =>
@ -933,16 +932,25 @@ export default class EmoteMenu extends Module {
if ( this.ref ) if ( this.ref )
this.createObserver(); this.createObserver();
t.on('chat.emotes:change-favorite', this.updateFavorites, this);
window.ffz_menu = this; window.ffz_menu = this;
} }
componentWillUnmount() { componentWillUnmount() {
this.destroyObserver(); this.destroyObserver();
t.off('chat.emotes:change-favorite', this.updateFavorites, this);
if ( window.ffz_menu === this ) if ( window.ffz_menu === this )
window.ffz_menu = null; window.ffz_menu = null;
} }
updateFavorites() {
const state = this.buildState(this.props, this.state);
this.setState(this.filterState(state.filter, state));
}
pickTone(tone) { pickTone(tone) {
tone = tone || null; tone = tone || null;
t.settings.provider.set('emoji-tone', tone); t.settings.provider.set('emoji-tone', tone);

View file

@ -459,7 +459,7 @@ export default class Input extends Module {
if (set && Array.isArray(set.emotes)) { if (set && Array.isArray(set.emotes)) {
for (const emote of set.emotes) { for (const emote of set.emotes) {
if (inst.doesEmoteMatchTerm(emote, search)) { if (inst.doesEmoteMatchTerm(emote, search)) {
const favorite = favorites.includes(parseInt(emote.id, 10)); const favorite = favorites.includes(emote.id);
const element = { const element = {
current: input, current: input,
replacement: emote.token, replacement: emote.token,