Skip to content

Commit 34151e2

Browse files
committed
Upload file
1 parent 31145a1 commit 34151e2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

krscript/src/main/java/com/omarea/krscript/ui/DialogLogFragment.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class DialogLogFragment : androidx.fragment.app.DialogFragment() {
7070
openExecutor(node)?.let { shellHandler ->
7171
ShellExecutor().execute(activity, node, script, onExit, params, shellHandler)
7272
}
73-
} ?: closeView()
73+
} ?: dismissAllowingStateLoss()
7474
}
7575

7676
private fun openExecutor(nodeInfo: RunnableNode): ShellHandlerBase {
@@ -237,9 +237,9 @@ class DialogLogFragment : androidx.fragment.app.DialogFragment() {
237237
}
238238

239239
override fun onExit(msg: Any?) {
240+
if (!hasError) actionEventHandler.onSuccess()
240241
updateLog(context?.getString(R.string.kr_shell_completed), endColor)
241242
actionEventHandler.onCompleted()
242-
if (!hasError) actionEventHandler.onSuccess()
243243
}
244244

245245
override fun updateLog(msg: SpannableString?) {

0 commit comments

Comments
 (0)