소스 검색

Properly remove ContactView from the overview

JC Brand 7 년 전
부모
커밋
faaaa8139a
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/converse-rosterview.js

+ 2 - 2
src/converse-rosterview.js

@@ -707,13 +707,13 @@
                     // also cause the contact's view to be removed from the
                     // "Pending Contacts" group.
                     this.model.contacts.remove(contact, {'silent': true});
-                    this.get(contact.get('jid')).remove();
                     this.onRemove(contact);
                 },
 
                 onRemove (contact) {
+                    this.remove(contact.get('jid'));
                     if (this.model.contacts.length === 0) {
-                        this.el.parentElement.removeChild(this.el);
+                        this.remove();
                     }
                 }
             });