|
|
@ -68,6 +68,9 @@ class TextPageFactory(dataSource: DataSource) : PageFactory<TextPage>(dataSource |
|
|
|
?: TextPage(title = it.title).format() |
|
|
|
?: TextPage(title = it.title).format() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (!hasNextChapter()) { |
|
|
|
|
|
|
|
return@with TextPage(text = "") |
|
|
|
|
|
|
|
} |
|
|
|
nextChapter?.let { |
|
|
|
nextChapter?.let { |
|
|
|
return@with it.page(0)?.removePageAloudSpan() |
|
|
|
return@with it.page(0)?.removePageAloudSpan() |
|
|
|
?: TextPage(title = it.title).format() |
|
|
|
?: TextPage(title = it.title).format() |
|
|
@ -83,6 +86,9 @@ class TextPageFactory(dataSource: DataSource) : PageFactory<TextPage>(dataSource |
|
|
|
?: TextPage(title = it.title).format() |
|
|
|
?: TextPage(title = it.title).format() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (!hasPrevChapter()) { |
|
|
|
|
|
|
|
return@with TextPage(text = "") |
|
|
|
|
|
|
|
} |
|
|
|
prevChapter?.let { |
|
|
|
prevChapter?.let { |
|
|
|
return@with it.lastPage()?.removePageAloudSpan() |
|
|
|
return@with it.lastPage()?.removePageAloudSpan() |
|
|
|
?: TextPage(title = it.title).format() |
|
|
|
?: TextPage(title = it.title).format() |
|
|
@ -97,6 +103,9 @@ class TextPageFactory(dataSource: DataSource) : PageFactory<TextPage>(dataSource |
|
|
|
return@with it.page(pageIndex + 2)?.removePageAloudSpan() |
|
|
|
return@with it.page(pageIndex + 2)?.removePageAloudSpan() |
|
|
|
?: TextPage(title = it.title).format() |
|
|
|
?: TextPage(title = it.title).format() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (!hasNextChapter()) { |
|
|
|
|
|
|
|
TextPage(text = "") |
|
|
|
|
|
|
|
} |
|
|
|
nextChapter?.let { nc -> |
|
|
|
nextChapter?.let { nc -> |
|
|
|
if (pageIndex < it.pageSize() - 1) { |
|
|
|
if (pageIndex < it.pageSize() - 1) { |
|
|
|
return@with nc.page(0)?.removePageAloudSpan() |
|
|
|
return@with nc.page(0)?.removePageAloudSpan() |
|
|
|