Commit ceb0b822 authored by JC Brand's avatar JC Brand

Two changes. See below

- No need for the `edited` event.
- Also, don't add load animation for MAM corrections
parent a8ef1d29
...@@ -61373,7 +61373,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -61373,7 +61373,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
this.initDebounced(); this.initDebounced();
this.model.messages.on('add', this.onMessageAdded, this); this.model.messages.on('add', this.onMessageAdded, this);
this.model.messages.on('rendered', this.scrollDown, this); this.model.messages.on('rendered', this.scrollDown, this);
this.model.messages.on('edited', view => this.markFollowups(view.el));
this.model.on('show', this.show, this); this.model.on('show', this.show, this);
this.model.on('destroy', this.remove, this); this.model.on('destroy', this.remove, this);
this.model.presence.on('change:show', this.onPresenceChanged, this); this.model.presence.on('change:show', this.onPresenceChanged, this);
...@@ -67279,8 +67278,11 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -67279,8 +67278,11 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}, },
onMessageEdited() { onMessageEdited() {
if (this.model.get('is_archived')) {
return;
}
this.el.addEventListener('animationend', () => u.removeClass('onload', this.el)); this.el.addEventListener('animationend', () => u.removeClass('onload', this.el));
this.model.collection.trigger('edited', this);
u.addClass('onload', this.el); u.addClass('onload', this.el);
}, },
...@@ -316,7 +316,6 @@ ...@@ -316,7 +316,6 @@
this.model.messages.on('add', this.onMessageAdded, this); this.model.messages.on('add', this.onMessageAdded, this);
this.model.messages.on('rendered', this.scrollDown, this); this.model.messages.on('rendered', this.scrollDown, this);
this.model.messages.on('edited', (view) => this.markFollowups(view.el));
this.model.on('show', this.show, this); this.model.on('show', this.show, this);
this.model.on('destroy', this.remove, this); this.model.on('destroy', this.remove, this);
......
...@@ -103,8 +103,10 @@ ...@@ -103,8 +103,10 @@
}, },
onMessageEdited () { onMessageEdited () {
if (this.model.get('is_archived')) {
return;
}
this.el.addEventListener('animationend', () => u.removeClass('onload', this.el)); this.el.addEventListener('animationend', () => u.removeClass('onload', this.el));
this.model.collection.trigger('edited', this);
u.addClass('onload', this.el); u.addClass('onload', this.el);
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment