mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
fix: broken 'Clone repository' after migration to Coroutines (fixes #1608)
This commit is contained in:
@@ -177,9 +177,11 @@ class MainFragment : BaseFragment() {
|
||||
git?.close()
|
||||
} finally {
|
||||
val success = git != null
|
||||
getDialog?.invoke()?.also { dialog ->
|
||||
if (dialog.isShowing) dialog.dismiss()
|
||||
if (success) flashSuccess(string.git_clone_success)
|
||||
withContext(Dispatchers.Main) {
|
||||
getDialog?.invoke()?.also { dialog ->
|
||||
if (dialog.isShowing) dialog.dismiss()
|
||||
if (success) flashSuccess(string.git_clone_success)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -190,7 +192,8 @@ class MainFragment : BaseFragment() {
|
||||
cloneJob.cancel(CancellationException("Cancelled by user"))
|
||||
}
|
||||
|
||||
getDialog = { builder.show() }
|
||||
val dialog = builder.show()
|
||||
getDialog = { dialog }
|
||||
}
|
||||
|
||||
private fun showCloneError(error: Throwable?) {
|
||||
|
||||
Reference in New Issue
Block a user