From 8c982ee54e6c127999af734607f1e517f7d86803 Mon Sep 17 00:00:00 2001 From: gedoor Date: Mon, 6 Sep 2021 17:38:41 +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/book/read/ReadBookActivity.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt index 9986f3ec9..e3b3b2c7b 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt @@ -209,7 +209,10 @@ class ReadBookActivity : ReadBookBaseActivity(), } launch { menu.findItem(R.id.menu_get_progress)?.isVisible = - withContext(IO) { AppWebDav.initWebDav() } + withContext(IO) { + runCatching { AppWebDav.initWebDav() } + .getOrElse { false } + } } } }