Fix rest of notebook unhandled promises (#16933)

* Fix rest of notebook unhandled promises

* add rule

* fix some tests
This commit is contained in:
Charles Gagnon
2021-08-30 14:14:48 -07:00
committed by GitHub
parent 26e08fdf9e
commit 76e01fee60
21 changed files with 79 additions and 53 deletions

View File

@@ -155,8 +155,8 @@ export class BookTreeViewProvider implements vscode.TreeDataProvider<BookTreeIte
async createBook(): Promise<void> {
const dialog = new CreateBookDialog(this.bookTocManager);
dialog.createDialog();
TelemetryReporter.sendActionEvent(BookTelemetryView, NbTelemetryActions.CreateBook);
return dialog.createDialog();
}
async getSelectionQuickPick(movingElement: BookTreeItem): Promise<quickPickResults> {
@@ -237,7 +237,7 @@ export class BookTreeViewProvider implements vscode.TreeDataProvider<BookTreeIte
if (showPreview) {
this.currentBook = this.books.find(book => book.bookPath === bookPath);
this._bookViewer.reveal(this.currentBook.bookItems[0], { expand: vscode.TreeItemCollapsibleState.Expanded, focus: true, select: true });
await this._bookViewer.reveal(this.currentBook.bookItems[0], { expand: vscode.TreeItemCollapsibleState.Expanded, focus: true, select: true });
await this.showPreviewFile(urlToOpen);
}