Renamed the double page split methods

so they're not longing conflicting with upstream's page split
This commit is contained in:
Jays2Kings 2021-04-12 13:33:36 -04:00
parent 45c8bdafd3
commit 652c935062
3 changed files with 6 additions and 6 deletions

View File

@ -361,7 +361,7 @@ class PagerPageHolder(
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.doOnNext { isAnimated -> .doOnNext { isAnimated ->
if (skipExtra) { if (skipExtra) {
onPageSplit() splitDoublePages()
} }
if (!isAnimated) { if (!isAnimated) {
if (viewer.config.readerTheme >= 2) { if (viewer.config.readerTheme >= 2) {
@ -715,9 +715,9 @@ class PagerPageHolder(
return ByteArrayInputStream(output.toByteArray()) return ByteArrayInputStream(output.toByteArray())
} }
private fun onPageSplit() { private fun splitDoublePages() {
extraPage ?: return extraPage ?: return
viewer.onPageSplit(page) viewer.splitDoublePages(page)
if (extraPage?.fullPage == true) { if (extraPage?.fullPage == true) {
extraPage = null extraPage = null
} }

View File

@ -372,8 +372,8 @@ abstract class PagerViewer(val activity: ReaderActivity) : BaseViewer {
return true return true
} }
fun onPageSplit(currentPage: ReaderPage) { fun splitDoublePages(currentPage: ReaderPage) {
adapter.onPageSplit(currentPage) adapter.splitDoublePages(currentPage)
} }
/** /**

View File

@ -143,7 +143,7 @@ class PagerViewerAdapter(private val viewer: PagerViewer) : ViewPagerAdapter() {
return POSITION_NONE return POSITION_NONE
} }
fun onPageSplit(current: ReaderPage) { fun splitDoublePages(current: ReaderPage) {
val oldCurrent = joinedItems.getOrNull(viewer.pager.currentItem) val oldCurrent = joinedItems.getOrNull(viewer.pager.currentItem)
setJoinedItems( setJoinedItems(
oldCurrent?.second == current || oldCurrent?.second == current ||