mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-04 08:08:55 +01:00 
			
		
		
		
	During migration, only do MangaController replacement if previous controller is also MangaController (#5869)
If previous controller is instead a MigrationController/other, push the new MangaController onto the stack instead
This commit is contained in:
		@@ -75,8 +75,14 @@ class SearchController(
 | 
			
		||||
        if (!isReplacingManga) {
 | 
			
		||||
            router.popController(this)
 | 
			
		||||
            if (newManga != null) {
 | 
			
		||||
                // Replaces old MangaController
 | 
			
		||||
                router.replaceTopController(RouterTransaction.with(MangaController(newManga)))
 | 
			
		||||
                val newMangaController = RouterTransaction.with(MangaController(newManga))
 | 
			
		||||
                if (router.backstack.last().controller is MangaController) {
 | 
			
		||||
                    // Replace old MangaController
 | 
			
		||||
                    router.replaceTopController(newMangaController)
 | 
			
		||||
                } else {
 | 
			
		||||
                    // Push MangaController on top of MigrationController
 | 
			
		||||
                    router.pushController(newMangaController)
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user