From 6dd279b4dabdb71269b6da68f82b6dc0a6ed54a1 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sat, 25 Sep 2021 18:14:38 +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 --- app/src/main/java/io/legado/app/help/AppUpdate.kt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/io/legado/app/help/AppUpdate.kt b/app/src/main/java/io/legado/app/help/AppUpdate.kt index 804bd9d88..c19713d6c 100644 --- a/app/src/main/java/io/legado/app/help/AppUpdate.kt +++ b/app/src/main/java/io/legado/app/help/AppUpdate.kt @@ -40,13 +40,14 @@ object AppUpdate { } else { throw NoStackTraceException("已是最新版本") } - }.onSuccess { - callback.invoke(it[0], it[1], it[2], it[3]) - }.onError { - if (showErrorMsg) { - appCtx.toastOnUi("检测更新\n${it.localizedMessage}") + }.timeout(10000) + .onSuccess { + callback.invoke(it[0], it[1], it[2], it[3]) + }.onError { + if (showErrorMsg) { + appCtx.toastOnUi("检测更新\n${it.localizedMessage}") + } } - } } } \ No newline at end of file