소스 검색

Two changes. See below

- No need for the `edited` event.
- Also, don't add load animation for MAM corrections
JC Brand 6 년 전
부모
커밋
ceb0b82245
3개의 변경된 파일7개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 2
      dist/converse.js
  2. 0 1
      src/converse-chatview.js
  3. 3 1
      src/converse-message-view.js

+ 4 - 2
dist/converse.js

@@ -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);
         },
 

+ 0 - 1
src/converse-chatview.js

@@ -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);

+ 3 - 1
src/converse-message-view.js

@@ -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);
                 },