mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-23 06:20:54 +00:00
4.43.0
* Added: Automatically reprocess chat messages when loading a channel for the first time. (Closes #1333) * Fixed: Random emotes being insert into chat when using the emote menu in some situations. (Closes #1337) * Fixed: When tokenizing messages, ignore fake emotes injected into Twitch's chat handler for the purpose of auto-completion and WYSIWYG support. * Changed: Switch to a better method for how to get `require` from webpack. * Changed: Update the logic used to calculate the container size when overlaying emotes. * API Added: `load_tracker` module for waiting for multiple events to finish. This is used to reprocess chat lines once every data source has finished loading to avoid multiple unnecessary updates. * API Added: Add-ons can now set a `load_events` array in their manifest to have the add-on loader register them with `load_tracker`, ensuring events don't fire before the add-on is able to execute.
This commit is contained in:
parent
e26f836267
commit
daa193aa03
17 changed files with 481 additions and 68 deletions
|
@ -352,6 +352,20 @@ export default class ChatLine extends Module {
|
|||
this.on('i18n:update', this.rerenderLines, this);
|
||||
this.on('chat.emotes:update-effects', this.checkEffects, this);
|
||||
|
||||
this.can_reprocess = true;
|
||||
|
||||
this.on('chat:room-add', () => this.can_reprocess = true);
|
||||
|
||||
this.on('load_tracker:complete:chat-data', () => {
|
||||
const val = this.chat.context.get('chat.update-when-loaded');
|
||||
if ( ! val || ! this.can_reprocess )
|
||||
return;
|
||||
|
||||
this.can_reprocess = false;
|
||||
this.log.info('Reprocessing chat lines due to data loads.');
|
||||
this.updateLines();
|
||||
});
|
||||
|
||||
this.on('experiments:changed:line_renderer', () => {
|
||||
const value = this.experiments.get('line_renderer'),
|
||||
cls = this.ChatLine._class;
|
||||
|
@ -552,6 +566,10 @@ export default class ChatLine extends Module {
|
|||
}
|
||||
|
||||
cls.prototype.ffzOpenReply = function() {
|
||||
if ( this.onMessageClick ) {
|
||||
return this.onMessageClick();
|
||||
}
|
||||
|
||||
if ( this.props.reply ) {
|
||||
this.setOPCardTray(this.props.reply);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue