From 627698d81fe9559ae23acfe3aec492bacfe1eceb Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 10 Jul 2021 11:05:10 -0400 Subject: [PATCH] Use fade transactions when handling shortcuts --- .../java/eu/kanade/tachiyomi/ui/main/MainActivity.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt index d5446b3e68..66a02b5b58 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt @@ -19,7 +19,6 @@ import com.bluelinelabs.conductor.Conductor import com.bluelinelabs.conductor.Controller import com.bluelinelabs.conductor.ControllerChangeHandler import com.bluelinelabs.conductor.Router -import com.bluelinelabs.conductor.RouterTransaction import com.google.android.material.appbar.AppBarLayout import com.google.android.material.behavior.HideBottomViewOnScrollBehavior import com.google.android.material.navigation.NavigationBarView @@ -310,7 +309,7 @@ class MainActivity : BaseViewBindingActivity() { router.popToRoot() } setSelectedNavItem(R.id.nav_browse) - router.pushController(BrowseController(true).withFadeTransaction()) + router.pushController(BrowseController(toExtensions = true).withFadeTransaction()) } SHORTCUT_MANGA -> { val extras = intent.extras ?: return false @@ -318,14 +317,14 @@ class MainActivity : BaseViewBindingActivity() { router.popToRoot() } setSelectedNavItem(R.id.nav_library) - router.pushController(RouterTransaction.with(MangaController(extras))) + router.pushController(MangaController(extras).withFadeTransaction()) } SHORTCUT_DOWNLOADS -> { if (router.backstackSize > 1) { router.popToRoot() } setSelectedNavItem(R.id.nav_more) - router.pushController(RouterTransaction.with(DownloadController())) + router.pushController(DownloadController().withFadeTransaction()) } Intent.ACTION_SEARCH, Intent.ACTION_SEND, "com.google.android.gms.actions.SEARCH_ACTION" -> { // If the intent match the "standard" Android search intent @@ -342,8 +341,8 @@ class MainActivity : BaseViewBindingActivity() { } INTENT_SEARCH -> { val query = intent.getStringExtra(INTENT_SEARCH_QUERY) - val filter = intent.getStringExtra(INTENT_SEARCH_FILTER) if (query != null && query.isNotEmpty()) { + val filter = intent.getStringExtra(INTENT_SEARCH_FILTER) if (router.backstackSize > 1) { router.popToRoot() }