More minor refactorings

Extracted from #7244

Co-authored-by: ivaniskandar <ivaniskandar@users.noreply.github.com>
(cherry picked from commit cb1830d747)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SearchController.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoHeaderAdapter.kt
This commit is contained in:
arkon
2022-06-19 17:32:31 -04:00
committed by Jobobby04
parent a9227a13e1
commit ea712646fc
14 changed files with 68 additions and 56 deletions
@@ -15,7 +15,6 @@ import eu.kanade.tachiyomi.ui.manga.MangaController
import eu.kanade.tachiyomi.util.system.toast
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.plus
import uy.kohesive.injekt.injectLazy
class SmartSearchController(bundle: Bundle? = null) : NucleusController<EhSmartSearchBinding, SmartSearchPresenter>() {
@@ -44,7 +43,7 @@ class SmartSearchController(bundle: Bundle? = null) : NucleusController<EhSmartS
presenter.smartSearchFlow
.onEach { results ->
if (results is SmartSearchPresenter.SearchResults.Found) {
val transaction = MangaController(results.manga, true, smartSearchConfig).withFadeTransaction()
val transaction = MangaController(results.manga.id!!, true, smartSearchConfig).withFadeTransaction()
router.replaceTopController(transaction)
} else {
if (results is SmartSearchPresenter.SearchResults.NotFound) {