Closes #1030 - Fixes navigation, white screen after back button
parent
fb8c82b1bd
commit
fcda84dce7
|
@ -124,11 +124,7 @@ open class HomeActivity : AppCompatActivity() {
|
||||||
val host = supportFragmentManager.findFragmentById(R.id.container) as NavHostFragment
|
val host = supportFragmentManager.findFragmentById(R.id.container) as NavHostFragment
|
||||||
|
|
||||||
val directions = when (from) {
|
val directions = when (from) {
|
||||||
BrowserDirection.FromGlobal -> {
|
BrowserDirection.FromGlobal -> NavGraphDirections.actionGlobalBrowser(sessionId)
|
||||||
NavGraphDirections.actionGlobalBrowser(sessionId).apply {
|
|
||||||
host.navController.popBackStack()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
BrowserDirection.FromHome -> HomeFragmentDirections.actionHomeFragmentToBrowserFragment(sessionId)
|
BrowserDirection.FromHome -> HomeFragmentDirections.actionHomeFragmentToBrowserFragment(sessionId)
|
||||||
BrowserDirection.FromSearch -> SearchFragmentDirections.actionSearchFragmentToBrowserFragment(sessionId)
|
BrowserDirection.FromSearch -> SearchFragmentDirections.actionSearchFragmentToBrowserFragment(sessionId)
|
||||||
BrowserDirection.FromSettings ->
|
BrowserDirection.FromSettings ->
|
||||||
|
|
|
@ -7,7 +7,9 @@
|
||||||
|
|
||||||
<action
|
<action
|
||||||
android:id="@+id/action_global_browser"
|
android:id="@+id/action_global_browser"
|
||||||
app:destination="@id/browserFragment" />
|
app:destination="@id/browserFragment"
|
||||||
|
app:popUpTo="@id/nav_graph"
|
||||||
|
app:popUpToInclusive="true" />
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/homeFragment"
|
android:id="@+id/homeFragment"
|
||||||
|
@ -47,7 +49,7 @@
|
||||||
<action
|
<action
|
||||||
android:id="@+id/action_browserFragment_to_homeFragment"
|
android:id="@+id/action_browserFragment_to_homeFragment"
|
||||||
app:destination="@id/homeFragment"
|
app:destination="@id/homeFragment"
|
||||||
app:popUpTo="@+id/homeFragment"
|
app:popUpTo="@+id/nav_graph"
|
||||||
app:popUpToInclusive="true" />
|
app:popUpToInclusive="true" />
|
||||||
<action
|
<action
|
||||||
android:id="@+id/action_browserFragment_to_searchFragment"
|
android:id="@+id/action_browserFragment_to_searchFragment"
|
||||||
|
|
Loading…
Reference in New Issue