pull/2468/head
Horis 2 years ago
parent dcce2c1aea
commit 62e13f6a6f
  1. 3
      app/src/main/java/io/legado/app/help/storage/BackupConfig.kt
  2. 4
      app/src/main/java/io/legado/app/ui/book/read/page/provider/TextPageFactory.kt
  3. 1
      app/src/main/java/io/legado/app/ui/config/BackupConfigFragment.kt

@ -50,7 +50,8 @@ object BackupConfig {
PreferKey.defaultCover,
PreferKey.defaultCoverDark,
PreferKey.backupPath,
PreferKey.defaultBookTreeUri
PreferKey.defaultBookTreeUri,
PreferKey.webDavDeviceName
)
//阅读配置

@ -34,7 +34,7 @@ class TextPageFactory(dataSource: DataSource) : PageFactory<TextPage>(dataSource
}
override fun moveToNext(upContent: Boolean): Boolean = with(dataSource) {
return if (hasNext()) {
return if (hasNext() && currentChapter != null) {
if (currentChapter?.isLastIndex(pageIndex) == true) {
ReadBook.moveToNextChapter(upContent)
} else {
@ -47,7 +47,7 @@ class TextPageFactory(dataSource: DataSource) : PageFactory<TextPage>(dataSource
}
override fun moveToPrev(upContent: Boolean): Boolean = with(dataSource) {
return if (hasPrev()) {
return if (hasPrev() && currentChapter != null) {
if (pageIndex <= 0) {
ReadBook.moveToPrevChapter(upContent)
} else {

@ -185,6 +185,7 @@ class BackupConfigFragment : PreferenceFragment(),
upPreferenceSummary(key, getPrefString(key))
viewModel.upWebDavConfig()
}
PreferKey.webDavDeviceName -> upPreferenceSummary(key, getPrefString(key))
}
}

Loading…
Cancel
Save