Two changes. See below

- No need for the `edited` event.
- Also, don't add load animation for MAM corrections
This commit is contained in:
JC Brand 2018-10-16 21:58:36 +02:00
parent a8ef1d2904
commit ceb0b82245
3 changed files with 7 additions and 4 deletions

6
dist/converse.js vendored
View File

@ -61373,7 +61373,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
this.initDebounced();
this.model.messages.on('add', this.onMessageAdded, 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('destroy', this.remove, 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_
},
onMessageEdited() {
if (this.model.get('is_archived')) {
return;
}
this.el.addEventListener('animationend', () => u.removeClass('onload', this.el));
this.model.collection.trigger('edited', this);
u.addClass('onload', this.el);
},

View File

@ -316,7 +316,6 @@
this.model.messages.on('add', this.onMessageAdded, 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('destroy', this.remove, this);

View File

@ -103,8 +103,10 @@
},
onMessageEdited () {
if (this.model.get('is_archived')) {
return;
}
this.el.addEventListener('animationend', () => u.removeClass('onload', this.el));
this.model.collection.trigger('edited', this);
u.addClass('onload', this.el);
},