Use fade transactions when handling shortcuts
(cherry picked from commit 627698d81fe9559ae23acfe3aec492bacfe1eceb)
This commit is contained in:
parent
6516a4285f
commit
15707d933a
@ -21,7 +21,6 @@ import com.bluelinelabs.conductor.Conductor
|
|||||||
import com.bluelinelabs.conductor.Controller
|
import com.bluelinelabs.conductor.Controller
|
||||||
import com.bluelinelabs.conductor.ControllerChangeHandler
|
import com.bluelinelabs.conductor.ControllerChangeHandler
|
||||||
import com.bluelinelabs.conductor.Router
|
import com.bluelinelabs.conductor.Router
|
||||||
import com.bluelinelabs.conductor.RouterTransaction
|
|
||||||
import com.google.android.material.appbar.AppBarLayout
|
import com.google.android.material.appbar.AppBarLayout
|
||||||
import com.google.android.material.behavior.HideBottomViewOnScrollBehavior
|
import com.google.android.material.behavior.HideBottomViewOnScrollBehavior
|
||||||
import com.google.android.material.navigation.NavigationBarView
|
import com.google.android.material.navigation.NavigationBarView
|
||||||
@ -363,7 +362,7 @@ class MainActivity : BaseViewBindingActivity<MainActivityBinding>() {
|
|||||||
router.popToRoot()
|
router.popToRoot()
|
||||||
}
|
}
|
||||||
setSelectedNavItem(R.id.nav_browse)
|
setSelectedNavItem(R.id.nav_browse)
|
||||||
router.pushController(BrowseController(true).withFadeTransaction())
|
router.pushController(BrowseController(toExtensions = true).withFadeTransaction())
|
||||||
}
|
}
|
||||||
SHORTCUT_MANGA -> {
|
SHORTCUT_MANGA -> {
|
||||||
val extras = intent.extras ?: return false
|
val extras = intent.extras ?: return false
|
||||||
@ -371,14 +370,14 @@ class MainActivity : BaseViewBindingActivity<MainActivityBinding>() {
|
|||||||
router.popToRoot()
|
router.popToRoot()
|
||||||
}
|
}
|
||||||
setSelectedNavItem(R.id.nav_library)
|
setSelectedNavItem(R.id.nav_library)
|
||||||
router.pushController(RouterTransaction.with(MangaController(extras)))
|
router.pushController(MangaController(extras).withFadeTransaction())
|
||||||
}
|
}
|
||||||
SHORTCUT_DOWNLOADS -> {
|
SHORTCUT_DOWNLOADS -> {
|
||||||
if (router.backstackSize > 1) {
|
if (router.backstackSize > 1) {
|
||||||
router.popToRoot()
|
router.popToRoot()
|
||||||
}
|
}
|
||||||
setSelectedNavItem(R.id.nav_more)
|
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" -> {
|
Intent.ACTION_SEARCH, Intent.ACTION_SEND, "com.google.android.gms.actions.SEARCH_ACTION" -> {
|
||||||
// If the intent match the "standard" Android search intent
|
// If the intent match the "standard" Android search intent
|
||||||
@ -395,8 +394,8 @@ class MainActivity : BaseViewBindingActivity<MainActivityBinding>() {
|
|||||||
}
|
}
|
||||||
INTENT_SEARCH -> {
|
INTENT_SEARCH -> {
|
||||||
val query = intent.getStringExtra(INTENT_SEARCH_QUERY)
|
val query = intent.getStringExtra(INTENT_SEARCH_QUERY)
|
||||||
val filter = intent.getStringExtra(INTENT_SEARCH_FILTER)
|
|
||||||
if (query != null && query.isNotEmpty()) {
|
if (query != null && query.isNotEmpty()) {
|
||||||
|
val filter = intent.getStringExtra(INTENT_SEARCH_FILTER)
|
||||||
if (router.backstackSize > 1) {
|
if (router.backstackSize > 1) {
|
||||||
router.popToRoot()
|
router.popToRoot()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user