Fixup! Rewrite SignInScene with modern coroutines

This commit is contained in:
tarsin committed 2023-01-08 22:30:35 +08:00
1 parent e2cd2ddc0d
commit b1e8678dbf
1 file changed
+6 -1
@@ -28,7 +28,12 @@ object EhClient {
request.job = scope.launchIO {
val callback: Callback<Any?>? = request.callback
try {
val result: Any? = execute(request.method, request.args)
val result: Any? = request.run {
if (args == null)
execute(method)
else
execute(method, *args!!)
}
withUIContext { callback?.onSuccess(result) }
} catch (e: Exception) {
if (e is CancellationException)