File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
app/src/main/java/com/itsaky/androidide/fragments Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -115,20 +115,21 @@ class TemplateDetailsFragment :
115115 return @executeAsyncProvideError
116116 }
117117
118- val projectDir = result.data.projectDir
118+ viewModel.setScreen(MainViewModel .SCREEN_MAIN )
119+ flashSuccess(string.project_created_successfully)
119120
120121 recentProjectsViewModel.insertProject(
121122 RecentProject (
122- location = projectDir.path,
123+ location = result.data. projectDir.path,
123124 name = result.data.name,
124125 createdAt = Date ().toString()
125126 )
126127 )
127128
128- flashSuccess(string.project_created_successfully)
129-
130-
131- (requireActivity() as MainActivity ).openProject(projectDir)
129+ viewModel.postTransition(viewLifecycleOwner) {
130+ // open the project
131+ (requireActivity() as MainActivity ).openProject(result.data.projectDir)
132+ }
132133 }
133134 }
134135
You can’t perform that action at this time.
0 commit comments