pull/32/head
kunfei 5 years ago
parent fbdc44ec17
commit 47e0b60317
  1. 15
      app/src/main/java/io/legado/app/ui/widget/page/TextPageFactory.kt

@ -47,18 +47,21 @@ class TextPageFactory private constructor(dataSource: DataSource) : PageFactory<
} }
override fun currentPage(): TextPage? { override fun currentPage(): TextPage? {
return dataSource.getCurrentChapter()?.page(index) return dataSource.getCurrentChapter()?.page(index) ?: TextPage(index, "index:$index")
// return TextPage(index, "index:$index")
} }
override fun nextPage(): TextPage? { override fun nextPage(): TextPage? {
return dataSource.getCurrentChapter()?.page(index + 1) return dataSource.getCurrentChapter()?.page(index + 1) ?: TextPage(
// return TextPage(index + 1, "index:${index + 1}") index + 1,
"index:${index + 1}"
)
} }
override fun previousPage(): TextPage? { override fun previousPage(): TextPage? {
return dataSource.getCurrentChapter()?.page(index - 1) return dataSource.getCurrentChapter()?.page(index - 1) ?: TextPage(
// return TextPage(index - 1, "index:${index - 1}") index - 1,
"index:${index - 1}"
)
} }

Loading…
Cancel
Save