Updates to package.json to show books on stable (#7836)

* Updates to package.json to show books on stable

* remove notebookQuality context key

* renamed untitiled to unsaved
This commit is contained in:
Maddy
2019-10-21 14:26:59 -07:00
committed by GitHub
parent 597a0cad6b
commit b8ad7e3072
7 changed files with 23 additions and 12 deletions

View File

@@ -41,7 +41,7 @@ export class BookTreeItem extends vscode.TreeItem {
this.collapsibleState = book.treeItemCollapsibleState;
this._sections = book.page;
if (book.isUntitled) {
this.contextValue = 'untitledBook';
this.contextValue = 'unsavedBook';
} else {
this.contextValue = 'savedBook';
}

View File

@@ -46,7 +46,7 @@ export class BookTreeViewProvider implements vscode.TreeDataProvider<BookTreeIte
}
private async initialize(bookPaths: string[]): Promise<void> {
await vscode.commands.executeCommand('setContext', 'untitledBooks', this._openAsUntitled);
await vscode.commands.executeCommand('setContext', 'unsavedBooks', this._openAsUntitled);
await Promise.all(bookPaths.map(async (bookPath) => {
let book: BookModel = new BookModel(bookPath, this._openAsUntitled, this._extensionContext);
await book.initializeContents();