Fix collection open state persistance. Closes #2228
This commit is contained in:
parent
90cc53361b
commit
d530d9cf95
2 changed files with 4 additions and 4 deletions
|
@ -2092,7 +2092,7 @@ var CollectionTree = class CollectionTree extends LibraryTree {
|
|||
/**
|
||||
* Persist the current open/closed state of rows to a pref
|
||||
*/
|
||||
_saveOpenStates = Zotero.Utilities.debounce(async function() {
|
||||
_saveOpenStates = async function() {
|
||||
var state = this._containerState;
|
||||
|
||||
// Every so often, remove obsolete rows
|
||||
|
@ -2134,8 +2134,8 @@ var CollectionTree = class CollectionTree extends LibraryTree {
|
|||
}
|
||||
|
||||
this._containerState = state;
|
||||
this._storeOpenStates = state;
|
||||
});
|
||||
this._storeOpenStates(state);
|
||||
};
|
||||
|
||||
_storeOpenStates = Zotero.Utilities.debounce(function(state) {
|
||||
Zotero.Prefs.set("sourceList.persist", JSON.stringify(state));
|
||||
|
|
|
@ -1219,7 +1219,7 @@ var ZoteroPane = new function()
|
|||
}
|
||||
|
||||
if (this.itemsView && this.itemsView.collectionTreeRow && this.itemsView.collectionTreeRow.id == collectionTreeRow.id) {
|
||||
Zotero.debug("Collection selection hasn't changed");
|
||||
Zotero.debug("ZoteroPane.onCollectionSelected: Collection selection hasn't changed");
|
||||
|
||||
// Update toolbar, in case editability has changed
|
||||
this._updateToolbarIconsForRow(collectionTreeRow);
|
||||
|
|
Loading…
Reference in a new issue