Bugfix. Bookmarks list didn't remember toggle state
We need to wait for the state to be fetched from storage before rendering the list.
This commit is contained in:
parent
298300e890
commit
6cbdaa0f4f
13
dist/converse.js
vendored
13
dist/converse.js
vendored
@ -48940,9 +48940,16 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_0__["default"].plugins
|
||||
'id': id
|
||||
});
|
||||
this.list_model.browserStorage = new Backbone.BrowserStorage[storage](id);
|
||||
this.list_model.fetch();
|
||||
this.render();
|
||||
this.sortAndPositionAllItems();
|
||||
|
||||
const render = () => {
|
||||
this.render();
|
||||
this.sortAndPositionAllItems();
|
||||
};
|
||||
|
||||
this.list_model.fetch({
|
||||
'success': render,
|
||||
'error': render
|
||||
});
|
||||
},
|
||||
|
||||
render() {
|
||||
|
@ -440,9 +440,12 @@ converse.plugins.add('converse-bookmarks', {
|
||||
id = `converse.room-bookmarks${_converse.bare_jid}-list-model`;
|
||||
this.list_model = new _converse.BookmarksList({'id': id});
|
||||
this.list_model.browserStorage = new Backbone.BrowserStorage[storage](id);
|
||||
this.list_model.fetch();
|
||||
this.render();
|
||||
this.sortAndPositionAllItems();
|
||||
|
||||
const render = () => {
|
||||
this.render();
|
||||
this.sortAndPositionAllItems();
|
||||
}
|
||||
this.list_model.fetch({'success': render, 'error': render});
|
||||
},
|
||||
|
||||
render () {
|
||||
|
Loading…
Reference in New Issue
Block a user