pull/1903/head
kunfei 3 years ago
parent 991cd6371e
commit 0bbb680971
  1. 2
      app/src/main/java/io/legado/app/ui/main/MainActivity.kt

@ -99,10 +99,10 @@ class MainActivity : VMBaseActivity<ActivityMainBinding, MainViewModel>(),
val lastBackupFile = withContext(IO) { AppWebDav.lastBackUp().getOrNull() } val lastBackupFile = withContext(IO) { AppWebDav.lastBackUp().getOrNull() }
?: return@launch ?: return@launch
if (lastBackupFile.lastModify - LocalConfig.lastBackup > DateUtils.MINUTE_IN_MILLIS) { if (lastBackupFile.lastModify - LocalConfig.lastBackup > DateUtils.MINUTE_IN_MILLIS) {
LocalConfig.lastBackup = lastBackupFile.lastModify
alert("恢复", "webDav书源比本地新,是否恢复") { alert("恢复", "webDav书源比本地新,是否恢复") {
cancelButton() cancelButton()
okButton { okButton {
LocalConfig.lastBackup = lastBackupFile.lastModify
viewModel.restoreWebDav(lastBackupFile.displayName) viewModel.restoreWebDav(lastBackupFile.displayName)
} }
} }

Loading…
Cancel
Save