From 6b554a39106d6060f9ed07dc384db72000ca85d0 Mon Sep 17 00:00:00 2001 From: gedoor Date: Thu, 14 Oct 2021 12:19:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/ui/login/SourceLoginDialog.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/login/SourceLoginDialog.kt b/app/src/main/java/io/legado/app/ui/login/SourceLoginDialog.kt index 1496e1a43..99e9758d2 100644 --- a/app/src/main/java/io/legado/app/ui/login/SourceLoginDialog.kt +++ b/app/src/main/java/io/legado/app/ui/login/SourceLoginDialog.kt @@ -23,7 +23,6 @@ import kotlinx.coroutines.Dispatchers.IO import kotlinx.coroutines.Dispatchers.Main import kotlinx.coroutines.launch import kotlinx.coroutines.withContext -import splitties.init.appCtx import splitties.views.onClick class SourceLoginDialog : BaseDialogFragment(R.layout.dialog_login) { @@ -117,13 +116,13 @@ class SourceLoginDialog : BaseDialogFragment(R.layout.dialog_login) { source.getLoginJs()?.let { try { source.evalJS(it) - appCtx.toastOnUi(R.string.success) + context?.toastOnUi(R.string.success) withContext(Main) { dismiss() } } catch (e: Exception) { AppLog.put("登录出错\n${e.localizedMessage}", e) - appCtx.toastOnUi("error:${e.localizedMessage}") + context?.toastOnUi("error:${e.localizedMessage}") e.printOnDebug() } }