From dafcaa105079b84270bf2eedb676e4d568db2294 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 7 Jun 2022 17:06:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DwebDav=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E4=B8=8D=E4=B8=8A=E6=97=B6webDav=E7=95=8C=E9=9D=A2=E6=97=A0?= =?UTF-8?q?=E5=93=8D=E5=BA=94=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/ui/book/read/ReadBookActivity.kt | 8 ++++++-- app/src/main/res/menu/book_read.xml | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) 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 d777971f2..48212d078 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 @@ -249,7 +249,11 @@ class ReadBookActivity : BaseReadBookActivity(), } } } - menu.findItem(R.id.menu_get_progress)?.isVisible = AppWebDav.isOk + launch { + menu.findItem(R.id.menu_get_progress)?.isVisible = withContext(IO) { + AppWebDav.isOk + } + } } } @@ -1059,7 +1063,7 @@ class ReadBookActivity : BaseReadBookActivity(), private fun startBackupJob() { backupJob?.cancel() backupJob = launch { - delay(120000) + delay(300000) withContext(IO) { ReadBook.book?.let { AppWebDav.uploadBookProgress(it) diff --git a/app/src/main/res/menu/book_read.xml b/app/src/main/res/menu/book_read.xml index 03238bc70..3f2b0b563 100644 --- a/app/src/main/res/menu/book_read.xml +++ b/app/src/main/res/menu/book_read.xml @@ -62,6 +62,7 @@