mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-17 10:16:57 +00:00
4.0.0-rc20.4
* Fixed: Infinite loop bug with badges. Sorry about that. * Fixed: Bug with the Room Actions editor's preview check-boxes.
This commit is contained in:
parent
6dde27ca82
commit
ba49d6b49c
5 changed files with 37 additions and 26 deletions
|
@ -605,7 +605,16 @@ export default class ChatHook extends Module {
|
|||
|
||||
|
||||
tryUpdateBadges() {
|
||||
this.log.debug('Trying to update badge data from the chat container.');
|
||||
if ( !this._badge_timer )
|
||||
this._badge_timer = setTimeout(() => this._tryUpdateBadges(), 0);
|
||||
}
|
||||
|
||||
_tryUpdateBadges() {
|
||||
if ( this._badge_timer )
|
||||
clearTimeout(this._badge_timer);
|
||||
this._badge_timer = null;
|
||||
|
||||
this.log.info('Trying to update badge data from the chat container.');
|
||||
const inst = this.ChatContainer.first;
|
||||
if ( inst )
|
||||
this.containerUpdated(inst, inst.props);
|
||||
|
@ -1557,10 +1566,10 @@ export default class ChatHook extends Module {
|
|||
cs = data.user && data.user.broadcastBadges || [],
|
||||
ocs = odata.user && odata.user.broadcastBadges || [];
|
||||
|
||||
if ( ! this.chat.badges.hasTwitchBadges() || bs.length !== obs.length )
|
||||
if ( this.chat.badges.getTwitchBadgeCount() !== bs.length || bs.length !== obs.length )
|
||||
this.chat.badges.updateTwitchBadges(bs);
|
||||
|
||||
if ( ! this.hasRoomBadges(cont) || cs.length !== ocs.length )
|
||||
if ( cont._ffz_room.badgeCount() !== cs.length || cs.length !== ocs.length )
|
||||
this.updateRoomBadges(cont, cs);
|
||||
|
||||
this.updateRoomRules(cont, props.chatRules);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue