mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-05 00:15:08 +01:00
Cleanup logic of onStripSplit
in WebtoonPageHolder 2 (#7976)
This commit is contained in:
parent
171d7f2b8c
commit
56826fb477
@ -300,11 +300,12 @@ class WebtoonPageHolder(
|
||||
// If we have reached this point [page] and its stream shouldn't be null
|
||||
val page = page!!
|
||||
val stream = page.stream!!
|
||||
val splitData = ImageUtil.getSplitDataForStream(imageStream)
|
||||
val splitData = ImageUtil.getSplitDataForStream(imageStream).toMutableList()
|
||||
val currentSplitData = splitData.removeFirst()
|
||||
val newPages = splitData.map {
|
||||
StencilPage(page) { ImageUtil.splitStrip(it, stream) }
|
||||
}.toMutableList()
|
||||
return newPages.removeFirst().stream!!()
|
||||
}
|
||||
return ImageUtil.splitStrip(currentSplitData) { imageStream }
|
||||
.also {
|
||||
// Running [onLongStripSplit] first results in issues with splitting
|
||||
viewer.onLongStripSplit(page, newPages)
|
||||
|
Loading…
Reference in New Issue
Block a user