mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-17 02:16:54 +00:00
4.0.0-rc19
* Added: Option to hide Squad Streaming banners on channel pages. * Changed: Rewrite the entire i18n system to use the standard ICU message format. * Changed: Render the context menu for chat messages in Chat on Videos. * Fixed: Badges not appearing correctly in chat. * Fixed: Messages in Chat on Videos with embeds appearing too wide.
This commit is contained in:
parent
8bc25b8d5f
commit
35316b8827
43 changed files with 1061 additions and 348 deletions
|
@ -560,7 +560,7 @@ export default class ChatHook extends Module {
|
|||
|
||||
this.ChatContainer.on('mount', this.containerMounted, this);
|
||||
this.ChatContainer.on('unmount', this.removeRoom, this);
|
||||
this.ChatContainer.on('receive-props', this.containerUpdated, this);
|
||||
this.ChatContainer.on('update', this.containerUpdated, this);
|
||||
|
||||
this.ChatContainer.ready((cls, instances) => {
|
||||
const t = this,
|
||||
|
@ -1544,15 +1544,23 @@ export default class ChatHook extends Module {
|
|||
cs = data.user && data.user.broadcastBadges || [],
|
||||
ocs = odata.user && odata.user.broadcastBadges || [];
|
||||
|
||||
if ( bs.length !== obs.length )
|
||||
if ( ! this.chat.badges.hasTwitchBadges() || bs.length !== obs.length )
|
||||
this.chat.badges.updateTwitchBadges(bs);
|
||||
|
||||
if ( cs.length !== ocs.length )
|
||||
if ( ! this.hasRoomBadges(cont) || cs.length !== ocs.length )
|
||||
this.updateRoomBadges(cont, cs);
|
||||
|
||||
this.updateRoomRules(cont, props.chatRules);
|
||||
}
|
||||
|
||||
hasRoomBadges(cont) { // eslint-disable-line class-methods-use-this
|
||||
const room = cont._ffz_room;
|
||||
if ( ! room )
|
||||
return false;
|
||||
|
||||
return room.hasBadges();
|
||||
}
|
||||
|
||||
updateRoomBadges(cont, badges) { // eslint-disable-line class-methods-use-this
|
||||
const room = cont._ffz_room;
|
||||
if ( ! room )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue