From 40c40db86f6b4c6c4f1cb31147429a76d5985c9b Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 24 May 2022 21:04:57 +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/ui/main/MainActivity.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/main/MainActivity.kt b/app/src/main/java/io/legado/app/ui/main/MainActivity.kt index 7eb32b074..21d6be4af 100644 --- a/app/src/main/java/io/legado/app/ui/main/MainActivity.kt +++ b/app/src/main/java/io/legado/app/ui/main/MainActivity.kt @@ -100,10 +100,10 @@ class MainActivity : VMBaseActivity(), val lastBackupFile = withContext(IO) { AppWebDav.lastBackUp().getOrNull() } ?: return@launch if (lastBackupFile.lastModify - LocalConfig.lastBackup > DateUtils.MINUTE_IN_MILLIS) { + LocalConfig.lastBackup = lastBackupFile.lastModify alert("恢复", "webDav书源比本地新,是否恢复") { cancelButton() okButton { - LocalConfig.lastBackup = lastBackupFile.lastModify viewModel.restoreWebDav(lastBackupFile.displayName) } } @@ -162,12 +162,13 @@ class MainActivity : VMBaseActivity(), if (LocalConfig.privacyPolicyOk) return val privacyPolicy = String(assets.open("privacyPolicy.md").readBytes()) alert("用户隐私与协议", privacyPolicy) { - noButton { - finish() - } + noButton() yesButton { LocalConfig.privacyPolicyOk = true } + onCancelled { + finish() + } } }