mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05:00
Cleanup logic of onStripSplit
in WebtoonPageHolder 2 (#7976)
This commit is contained in:
parent
171d7f2b8c
commit
56826fb477
1 changed files with 4 additions and 3 deletions
|
@ -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 a new issue