Closes #653, Remember last-accessed collection
Because of the way item caching works, this doesn't fix most of the startup delay problems, though
This commit is contained in:
parent
667c1e4743
commit
08da46cab3
|
@ -69,8 +69,19 @@ Zotero.CollectionTreeView.prototype.setTree = function(treebox)
|
|||
|
||||
this.refresh();
|
||||
|
||||
//select Library
|
||||
this.selection.select(0);
|
||||
// Select the last-viewed collection
|
||||
var lastViewedFolder = Zotero.Prefs.get('lastViewedFolder');
|
||||
var matches = lastViewedFolder.match(/^(?:(C|S)([0-9]+)|L)$/);
|
||||
var select = 0;
|
||||
if (matches) {
|
||||
if (matches[1] == 'C' && this._collectionRowMap[matches[2]]) {
|
||||
select = this._collectionRowMap[matches[2]];
|
||||
}
|
||||
else if (matches[1] == 'S' && this._searchRowMap[matches[2]]) {
|
||||
select = this._searchRowMap[matches[2]];
|
||||
}
|
||||
}
|
||||
this.selection.select(select);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -2564,6 +2564,8 @@ Zotero.Items = new function(){
|
|||
|
||||
|
||||
function cacheFields(fields, items) {
|
||||
Zotero.debug("Caching fields [" + fields.join() + "]"
|
||||
+ (items ? " for " + items + " items" : ''));
|
||||
_load(items);
|
||||
|
||||
var primaryFields = [];
|
||||
|
|
|
@ -24,6 +24,7 @@ pref("extensions.zotero.capitalizeTitles", true);
|
|||
pref("extensions.zotero.lastCreatorFieldMode",0);
|
||||
pref("extensions.zotero.lastAbstractExpand",0);
|
||||
pref("extensions.zotero.lastRenameAssociatedFile", false);
|
||||
pref("extensions.zotero.lastViewedFolder", 'L');
|
||||
|
||||
// Keyboard shortcuts
|
||||
pref("extensions.zotero.keys.overrideGlobal", false);
|
||||
|
|
Loading…
Reference in New Issue
Block a user