|
|
@ -42,7 +42,6 @@ class TextPageFactory private constructor(dataSource: DataSource) : |
|
|
|
return if (hasNext()) { |
|
|
|
return if (hasNext()) { |
|
|
|
if (dataSource.getCurrentChapter()?.isLastIndex(index) == true) { |
|
|
|
if (dataSource.getCurrentChapter()?.isLastIndex(index) == true) { |
|
|
|
dataSource.moveToNextChapter() |
|
|
|
dataSource.moveToNextChapter() |
|
|
|
dataSource.setPageIndex(0) |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
dataSource.setPageIndex(index.plus(1)) |
|
|
|
dataSource.setPageIndex(index.plus(1)) |
|
|
|
} |
|
|
|
} |
|
|
@ -57,7 +56,6 @@ class TextPageFactory private constructor(dataSource: DataSource) : |
|
|
|
dataSource.setPageIndex(index.minus(1)) |
|
|
|
dataSource.setPageIndex(index.minus(1)) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
dataSource.moveToPrevChapter() |
|
|
|
dataSource.moveToPrevChapter() |
|
|
|
dataSource.setPageIndex(dataSource.getPreviousChapter()?.lastIndex() ?: 0) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
true |
|
|
|
true |
|
|
|
} else |
|
|
|
} else |
|
|
|