1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-27 12:55:55 +00:00
* Fixed: The FFZ Control Center button appearing multiple times on the Creator Dashboard.
* Fixed: Native global chat badges not appearing correctly.
This commit is contained in:
SirStendec 2024-09-27 18:50:52 -04:00
parent 0ffc041c0c
commit f8fcdef363
4 changed files with 19 additions and 7 deletions

View file

@ -1,7 +1,7 @@
{
"name": "frankerfacez",
"author": "Dan Salvato LLC",
"version": "4.74.0",
"version": "4.74.1",
"description": "FrankerFaceZ is a Twitch enhancement suite.",
"private": true,
"license": "Apache-2.0",

View file

@ -1395,7 +1395,9 @@ export default class Badges extends Module {
updateTwitchBadges(badges) {
this.twitch_badge_count = 0;
if ( ! Array.isArray(badges) )
if ( ! badges )
this.twitch_badges = {};
else if ( ! Array.isArray(badges) )
this.twitch_badges = badges;
else {
let b = null;

View file

@ -3477,6 +3477,11 @@ export default class ChatHook extends Module {
this.updateRoomBitsConfig(cont, props.bitsConfig);
if ( props.globalBadgeData?.badges )
this.chat.badges.updateTwitchBadges(props.globalBadgeData.badges);
else if (props.data?.badges )
this.chat.badges.updateTwitchBadges(props.data.badges);
if ( props.data ) {
if ( this.shouldUpdateChannel ){
const color = props.data.user?.primaryColorHex;
@ -3489,7 +3494,6 @@ export default class ChatHook extends Module {
});
}
this.chat.badges.updateTwitchBadges(props.data.badges);
this.updateRoomBadges(cont, props.data.user && props.data.user.broadcastBadges);
this.updateRoomRules(cont, props.chatRules);
}
@ -3539,14 +3543,20 @@ export default class ChatHook extends Module {
// can't compare the badgeSets property in any reasonable way.
// Instead, just check the lengths to see if they've changed
// and hope that badge versions will never change separately.
const data = props.data || {},
const cs = props.data?.user?.broadcastBadges ?? [],
ocs = cont.props.data?.user?.broadcastBadges ?? [];
const bs = props.globalBadgeData?.badges ?? [],
obs = cont.props.globalBadgeData?.badges ?? [];
/*const data = props.data || {},
odata = cont.props.data || {},
bs = data.badges || [],
obs = odata.badges || [],
cs = data.user && data.user.broadcastBadges || [],
ocs = odata.user && odata.user.broadcastBadges || [];
ocs = odata.user && odata.user.broadcastBadges || [];*/
if ( this.chat.badges.getTwitchBadgeCount() !== bs.length || bs.length !== obs.length )
this.chat.badges.updateTwitchBadges(bs);

View file

@ -57,7 +57,7 @@ export default class MenuButton extends Module {
);*/
this.SunlightNav = this.elemental.define(
'sunlight-nav', '.sunlight-top-nav > div > div > div:last-child > div',
'sunlight-nav', '.sunlight-top-nav > div > div > div > div:last-child > div',
Twilight.SUNLIGHT_ROUTES,
{attributes: true}, 1
);
@ -850,4 +850,4 @@ export default class MenuButton extends Module {
this.off('i18n:update', this.update);
this.off(':clicked', this.loadMenu);
}
}
}