No need to manually remove. Gets done in the OrderedListView
This commit is contained in:
parent
fc631e7f8c
commit
a91e9216e6
@ -386,10 +386,6 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
_converse.BookmarkView = Backbone.VDOMView.extend({
|
_converse.BookmarkView = Backbone.VDOMView.extend({
|
||||||
initialize () {
|
|
||||||
this.model.on('destroy', this.remove.bind(this));
|
|
||||||
},
|
|
||||||
|
|
||||||
toHTML () {
|
toHTML () {
|
||||||
return tpl_bookmark({
|
return tpl_bookmark({
|
||||||
'hidden': _converse.hide_open_bookmarks &&
|
'hidden': _converse.hide_open_bookmarks &&
|
||||||
|
@ -2196,7 +2196,6 @@
|
|||||||
tagName: 'li',
|
tagName: 'li',
|
||||||
initialize () {
|
initialize () {
|
||||||
this.model.on('change', this.render, this);
|
this.model.on('change', this.render, this);
|
||||||
this.model.on('destroy', this.destroy, this);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
toHTML () {
|
toHTML () {
|
||||||
|
@ -609,8 +609,6 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
onRemove (contact) {
|
onRemove (contact) {
|
||||||
this.get(contact.get('id')).remove();
|
|
||||||
this.remove(contact.get('id'));
|
|
||||||
if (this.model.contacts.length === 0) {
|
if (this.model.contacts.length === 0) {
|
||||||
this.el.parentElement.removeChild(this.el);
|
this.el.parentElement.removeChild(this.el);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user