|
|
@ -29,8 +29,7 @@ class TextPageFactory(dataSource: DataSource) : PageFactory<TextPage>(dataSource |
|
|
|
|
|
|
|
|
|
|
|
override fun moveToNext(): Boolean = with(dataSource) { |
|
|
|
override fun moveToNext(): Boolean = with(dataSource) { |
|
|
|
return if (hasNext()) { |
|
|
|
return if (hasNext()) { |
|
|
|
if (getCurrentChapter()?.isLastIndex(pageIndex) == true |
|
|
|
if (getCurrentChapter()?.isLastIndex(pageIndex) == true) { |
|
|
|
) { |
|
|
|
|
|
|
|
ReadBook.moveToNextChapter(false) |
|
|
|
ReadBook.moveToNextChapter(false) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
setPageIndex(pageIndex.plus(1)) |
|
|
|
setPageIndex(pageIndex.plus(1)) |
|
|
@ -40,7 +39,7 @@ class TextPageFactory(dataSource: DataSource) : PageFactory<TextPage>(dataSource |
|
|
|
false |
|
|
|
false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override fun moveToPrevious(): Boolean = with(dataSource) { |
|
|
|
override fun moveToPrev(): Boolean = with(dataSource) { |
|
|
|
return if (hasPrev()) { |
|
|
|
return if (hasPrev()) { |
|
|
|
if (pageIndex <= 0) { |
|
|
|
if (pageIndex <= 0) { |
|
|
|
ReadBook.moveToPrevChapter(false) |
|
|
|
ReadBook.moveToPrevChapter(false) |
|
|
|