Focus projects view when New Project is created (#11048)

* Focusing for new project

* Consolidated focus() logic
This commit is contained in:
Benjin Dubishar
2020-06-23 21:08:40 -07:00
committed by GitHub
parent 17621e4df3
commit cf73cf5003
2 changed files with 5 additions and 7 deletions

View File

@@ -93,6 +93,7 @@ export class ProjectsController {
try {
this.refreshProjectsTree();
this.focusProject(newProject);
}
catch (err) {
// if the project didnt load - remove it from the list of open projects
@@ -641,8 +642,6 @@ export class ProjectsController {
//Refresh project to show the added files
this.refreshProjectsTree();
await this.focusProject(project);
}
catch (err) {
this.apiWrapper.showErrorMessage(utils.getErrorMessage(err));