Commit 463caf36 authored by JC Brand's avatar JC Brand

bookmarks: silently remove bookmarks when clearing the session

parent 0895abf3
...@@ -277,7 +277,7 @@ converse.plugins.add('converse-bookmarks', { ...@@ -277,7 +277,7 @@ converse.plugins.add('converse-bookmarks', {
_converse.api.listen.on('clearSession', () => { _converse.api.listen.on('clearSession', () => {
if (_converse.bookmarks !== undefined) { if (_converse.bookmarks !== undefined) {
_converse.bookmarks.clearSession(); _converse.bookmarks.clearSession({'silent': true});
window.sessionStorage.removeItem(_converse.bookmarks.fetched_flag); window.sessionStorage.removeItem(_converse.bookmarks.fetched_flag);
} }
}); });
......
...@@ -108,8 +108,8 @@ _converse.VERSION_NAME = "v5.0.4dev"; ...@@ -108,8 +108,8 @@ _converse.VERSION_NAME = "v5.0.4dev";
Object.assign(_converse, Backbone.Events); Object.assign(_converse, Backbone.Events);
_converse.Collection = Backbone.Collection.extend({ _converse.Collection = Backbone.Collection.extend({
clearSession () { clearSession (options) {
Array.from(this.models).forEach(m => m.destroy()); Array.from(this.models).forEach(m => m.destroy(options));
this.browserStorage._clear(); this.browserStorage._clear();
this.reset(); this.reset();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment