mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-25 12:08:30 +00:00
4.47.0
* Added: `/ffz reload` command to reload emote and badge data without reloading the page. (Note: Add-ons will need to update to add support for the command.) * Changed: Improve monitor support for Current Monitor, specifically when a user has multiple monitors with the same name. * Fixed: Track the loaded status of global FFZ badges when loading chat data. * Fixed: The page scrolling incorrectly when using the FFZ emote menu in some situations.
This commit is contained in:
parent
9381c17e71
commit
e6ad12c937
11 changed files with 219 additions and 18 deletions
|
@ -639,6 +639,11 @@ export default class Emotes extends Module {
|
|||
|
||||
this.on('socket:command:follow_sets', this.updateFollowSets, this);
|
||||
|
||||
this.on('chat:reload-data', flags => {
|
||||
if ( ! flags || flags.emotes )
|
||||
this.loadGlobalSets();
|
||||
});
|
||||
|
||||
this.loadGlobalSets();
|
||||
}
|
||||
|
||||
|
@ -1419,6 +1424,14 @@ export default class Emotes extends Module {
|
|||
}
|
||||
|
||||
removeDefaultSet(provider, set_id) {
|
||||
if ( ! set_id ) {
|
||||
const sets = this.default_sets.get(provider);
|
||||
if ( sets )
|
||||
for(const set_id of Array.from(sets))
|
||||
this.removeDefaultSet(provider, set_id);
|
||||
return;
|
||||
}
|
||||
|
||||
if ( typeof set_id === 'number' )
|
||||
set_id = `${set_id}`;
|
||||
|
||||
|
@ -1530,6 +1543,9 @@ export default class Emotes extends Module {
|
|||
|
||||
const sets = data.sets || {};
|
||||
|
||||
// Remove existing global sets, in case we have any.
|
||||
this.removeDefaultSet('ffz-global');
|
||||
|
||||
for(const set_id of data.default_sets)
|
||||
this.addDefaultSet('ffz-global', set_id);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue