优化
This commit is contained in:
@@ -50,7 +50,8 @@ object BackupConfig {
|
|||||||
PreferKey.defaultCover,
|
PreferKey.defaultCover,
|
||||||
PreferKey.defaultCoverDark,
|
PreferKey.defaultCoverDark,
|
||||||
PreferKey.backupPath,
|
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) {
|
override fun moveToNext(upContent: Boolean): Boolean = with(dataSource) {
|
||||||
return if (hasNext()) {
|
return if (hasNext() && currentChapter != null) {
|
||||||
if (currentChapter?.isLastIndex(pageIndex) == true) {
|
if (currentChapter?.isLastIndex(pageIndex) == true) {
|
||||||
ReadBook.moveToNextChapter(upContent)
|
ReadBook.moveToNextChapter(upContent)
|
||||||
} else {
|
} else {
|
||||||
@@ -47,7 +47,7 @@ class TextPageFactory(dataSource: DataSource) : PageFactory<TextPage>(dataSource
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun moveToPrev(upContent: Boolean): Boolean = with(dataSource) {
|
override fun moveToPrev(upContent: Boolean): Boolean = with(dataSource) {
|
||||||
return if (hasPrev()) {
|
return if (hasPrev() && currentChapter != null) {
|
||||||
if (pageIndex <= 0) {
|
if (pageIndex <= 0) {
|
||||||
ReadBook.moveToPrevChapter(upContent)
|
ReadBook.moveToPrevChapter(upContent)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -185,6 +185,7 @@ class BackupConfigFragment : PreferenceFragment(),
|
|||||||
upPreferenceSummary(key, getPrefString(key))
|
upPreferenceSummary(key, getPrefString(key))
|
||||||
viewModel.upWebDavConfig()
|
viewModel.upWebDavConfig()
|
||||||
}
|
}
|
||||||
|
PreferKey.webDavDeviceName -> upPreferenceSummary(key, getPrefString(key))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user