Replaced direct usage of manager coroutineScope to use an method that handles errors

This commit is contained in:
Abdelilah El Aissaoui 2022-04-01 19:33:02 +02:00
parent f86e2391c0
commit a9accafafb

View File

@ -255,7 +255,9 @@ class TabViewModel @Inject constructor(
}
}
fun initLocalRepository(dir: String) = tabState.managerScope.launch(Dispatchers.IO){
fun initLocalRepository(dir: String) = tabState.safeProcessingWihoutGit(
showError = true,
) {
val repoDir = File(dir)
repositoryManager.initLocalRepo(repoDir)
openRepository(repoDir)