修复webDav连接不上时webDav界面无响应的bug

pull/1959/head
kunfei 2 years ago
parent f65bff25f5
commit dafcaa1050
  1. 8
      app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt
  2. 1
      app/src/main/res/menu/book_read.xml

@ -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)

@ -62,6 +62,7 @@
<item
android:id="@+id/menu_get_progress"
android:title="@string/get_book_progress"
android:visible="false"
app:showAsAction="never" />
<item

Loading…
Cancel
Save