diff --git a/app/src/main/java/io/legado/app/help/storage/BackupConfig.kt b/app/src/main/java/io/legado/app/help/storage/BackupConfig.kt index 9d1f3225c..4b0de9718 100644 --- a/app/src/main/java/io/legado/app/help/storage/BackupConfig.kt +++ b/app/src/main/java/io/legado/app/help/storage/BackupConfig.kt @@ -50,7 +50,8 @@ object BackupConfig { PreferKey.defaultCover, PreferKey.defaultCoverDark, PreferKey.backupPath, - PreferKey.defaultBookTreeUri + PreferKey.defaultBookTreeUri, + PreferKey.webDavDeviceName ) //阅读配置 diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/provider/TextPageFactory.kt b/app/src/main/java/io/legado/app/ui/book/read/page/provider/TextPageFactory.kt index 80ddeff08..1bceccd6a 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/provider/TextPageFactory.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/provider/TextPageFactory.kt @@ -34,7 +34,7 @@ class TextPageFactory(dataSource: DataSource) : PageFactory(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(dataSource } override fun moveToPrev(upContent: Boolean): Boolean = with(dataSource) { - return if (hasPrev()) { + return if (hasPrev() && currentChapter != null) { if (pageIndex <= 0) { ReadBook.moveToPrevChapter(upContent) } else { diff --git a/app/src/main/java/io/legado/app/ui/config/BackupConfigFragment.kt b/app/src/main/java/io/legado/app/ui/config/BackupConfigFragment.kt index c390af8c6..a9e645e41 100644 --- a/app/src/main/java/io/legado/app/ui/config/BackupConfigFragment.kt +++ b/app/src/main/java/io/legado/app/ui/config/BackupConfigFragment.kt @@ -185,6 +185,7 @@ class BackupConfigFragment : PreferenceFragment(), upPreferenceSummary(key, getPrefString(key)) viewModel.upWebDavConfig() } + PreferKey.webDavDeviceName -> upPreferenceSummary(key, getPrefString(key)) } }