1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-16 01:56:55 +00:00
* Fixed: Smooth Scrolling no longer causing chat to scroll. (Closes #1068)
* Fixed: Issue with users using certain external stylesheets causing chat messages to become impossible to read on mouse hover. (Closes #1066)
* Fixed: Issues with badge sorting causing some badges to be overridden when they shouldn't be.
* Changed: Improve caching of badge data, such that re-rendering chat lines requires less computation.
* Changed: Refactor how chat lines listen for settings changes to reduce code duplication.
* Changed: Refactor how chat lines are invalidated to minimize work when changing settings.
* API Added: `chat:rerender-lines` event that, when emitted, causes all chat lines to be re-rendered.
* API Added: `chat:update-line-tokens` event that, when emitted, causes all chat lines to have their tokens invalidated and recalculated.
* API Added: `chat:update-line-badges` event that, when emitted, causes all chat lines to have their cached badges invalidated and recalculated.
* API Changed: `chat:update-lines-by-user` now has extra properties for separately invalidating tokens or badges. The full signature is `chat:update-lines-by-user(id, login, invalidate_tokens = true, invalidate_badges = true)`
This commit is contained in:
SirStendec 2021-06-23 16:08:57 -04:00
parent d5478d71cd
commit 3c1d61993a
10 changed files with 256 additions and 121 deletions

View file

@ -673,7 +673,8 @@ export default class ChatHook extends Module {
ic.mode = mode;
ic.contrast = contrast;
this.updateChatLines();
this.chat_line.rerenderLines();
//this.updateChatLines();
this.updateMentionCSS();
this.emit(':update-colors');
}
@ -844,11 +845,6 @@ export default class ChatHook extends Module {
this.chat.context.on('changed:chat.filtering.highlight-mentions', this.updateMentionCSS, this);
this.chat.context.on('changed:chat.filtering.highlight-tokens', this.updateMentionCSS, this);
this.chat.context.on('changed:chat.filtering.mention-color', this.updateMentionCSS, this);
this.chat.context.on('changed:chat.fix-bad-emotes', this.updateChatLines, this);
this.chat.context.on('changed:chat.points.allow-highlight', this.updateChatLines, this);
this.chat.context.on('changed:chat.filtering.display-deleted', this.updateChatLines, this);
this.chat.context.on('changed:chat.filtering.display-mod-action', this.updateChatLines, this);
this.chat.context.on('changed:chat.replies.style', this.updateChatLines, this);
this.chat.context.on('changed:chat.filtering.clickable-mentions', val => this.css_tweaks.toggle('clickable-mentions', val));
this.chat.context.on('changed:chat.filtering.bold-mentions', val => this.css_tweaks.toggle('chat-mention-no-bold', ! val));
this.chat.context.on('changed:chat.pin-resubs', val => {
@ -2382,9 +2378,9 @@ export default class ChatHook extends Module {
}
updateChatLines() {
/*updateChatLines() {
this.chat_line.updateLines();
}
}*/
// ========================================================================
@ -2541,7 +2537,8 @@ export default class ChatHook extends Module {
this._ffz_old_bits = new_bits;
room.updateBitsConfig(formatBitsConfig(config));
this.updateChatLines();
this.chat_line.updateLineTokens();
//this.updateChatLines();
}
@ -2688,7 +2685,8 @@ export default class ChatHook extends Module {
return;
room.updateBadges(badges);
this.updateChatLines();
this.chat_line.updateLineBadges();
//this.updateChatLines();
}
updateRoomRules(cont, rules) { // eslint-disable-line class-methods-use-this