Fix feed update refreshing, scrolling item and collection trees
Closes #2950
This commit is contained in:
parent
7e6f7ac4b3
commit
b213b8f15d
2 changed files with 12 additions and 2 deletions
|
@ -642,7 +642,10 @@ var CollectionTree = class CollectionTree extends LibraryTree {
|
|||
return;
|
||||
}
|
||||
if (type == 'feed' && (action == 'unreadCountUpdated' || action == 'statusChanged')) {
|
||||
this.tree.invalidate();
|
||||
let feedRow = this.getRowIndexByID("L" + ids[0]);
|
||||
if (feedRow !== false) {
|
||||
this.tree.invalidateRow(feedRow);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -747,7 +750,7 @@ var CollectionTree = class CollectionTree extends LibraryTree {
|
|||
// Invalidate parent in case it's become non-empty
|
||||
let parentRow = this.getRowIndexByID("C" + collection.parentID);
|
||||
if (parentRow !== false) {
|
||||
this._treebox.invalidateRow(parentRow);
|
||||
this.tree.invalidateRow(parentRow);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -771,6 +774,9 @@ var CollectionTree = class CollectionTree extends LibraryTree {
|
|||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'feed':
|
||||
break;
|
||||
|
||||
default:
|
||||
await this.reload();
|
||||
|
|
|
@ -92,6 +92,10 @@ function doUnload()
|
|||
|
||||
var onCollectionSelected = async function () {
|
||||
if (!collectionsView.selection.count) return;
|
||||
// Collection not changed
|
||||
if (itemsView && itemsView.collectionTreeRow && itemsView.collectionTreeRow.id == collectionTreeRow.id) {
|
||||
return;
|
||||
}
|
||||
var collectionTreeRow = collectionsView.getRow(collectionsView.selection.focused);
|
||||
collectionTreeRow.setSearch('');
|
||||
Zotero.Prefs.set('lastViewedFolder', collectionTreeRow.id);
|
||||
|
|
Loading…
Reference in a new issue