Only reveal items in the books viewlet if the viewlet is visible. (#10234)

This commit is contained in:
Cory Rivera
2020-04-30 20:10:27 -07:00
committed by GitHub
parent b4deca3b4b
commit d7a425239b

View File

@@ -110,9 +110,7 @@ export class BookTreeViewProvider implements vscode.TreeDataProvider<BookTreeIte
this.currentBook = existingBook;
} else {
await this.createAndAddBookModel(bookPath, !!isNotebook);
let bookViewer = vscode.window.createTreeView(this.viewId, { showCollapseAll: true, treeDataProvider: this });
this.currentBook = this.books.find(book => book.bookPath === bookPath);
bookViewer.reveal(this.currentBook.bookItems[0], { expand: vscode.TreeItemCollapsibleState.Expanded, focus: true, select: true });
}
if (showPreview) {