mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Add missing await (#10952)
This commit is contained in:
@@ -67,7 +67,7 @@ export class SqlDatabaseProjectTreeViewProvider implements vscode.TreeDataProvid
|
|||||||
this.treeView = value;
|
this.treeView = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async focus(project: Project) {
|
public async focus(project: Project): Promise<void> {
|
||||||
const projNode = this.roots.find(x => x instanceof ProjectRootTreeItem ? (<ProjectRootTreeItem>x).project === project : false);
|
const projNode = this.roots.find(x => x instanceof ProjectRootTreeItem ? (<ProjectRootTreeItem>x).project === project : false);
|
||||||
|
|
||||||
if (projNode) {
|
if (projNode) {
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ export default class MainController implements Disposable {
|
|||||||
await this.projectsController.openProject(file);
|
await this.projectsController.openProject(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.projectsController.focusProject(this.projectsController.projects[prevCount]); // focus the first of the newly-opened projects
|
await this.projectsController.focusProject(this.projectsController.projects[prevCount]); // focus the first of the newly-opened projects
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
|
|||||||
@@ -94,10 +94,10 @@ export class ProjectsController {
|
|||||||
return newProject;
|
return newProject;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async focusProject(project?: Project) {
|
public async focusProject(project?: Project): Promise<void> {
|
||||||
if (project && this.projects.includes(project)) {
|
if (project && this.projects.includes(project)) {
|
||||||
await this.apiWrapper.executeCommand('sqlDatabaseProjectsView.focus');
|
await this.apiWrapper.executeCommand('sqlDatabaseProjectsView.focus');
|
||||||
this.projectTreeViewProvider.focus(project);
|
await this.projectTreeViewProvider.focus(project);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -619,7 +619,7 @@ export class ProjectsController {
|
|||||||
//Refresh project to show the added files
|
//Refresh project to show the added files
|
||||||
this.refreshProjectsTree();
|
this.refreshProjectsTree();
|
||||||
|
|
||||||
this.focusProject(project);
|
await this.focusProject(project);
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
this.apiWrapper.showErrorMessage(utils.getErrorMessage(err));
|
this.apiWrapper.showErrorMessage(utils.getErrorMessage(err));
|
||||||
|
|||||||
Reference in New Issue
Block a user