mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-04 08:08:55 +01:00 
			
		
		
		
	Cleanup logic of onStripSplit in WebtoonPageHolder 2 (#7976)
				
					
				
			This commit is contained in:
		@@ -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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user