Fixed
Status Update
Comments
jb...@google.com <jb...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit ce6b342d81cae6406445d3aef97a927e31d51772
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Sep 08 14:11:03 2021
Fix NavDestination hashCode function
NavDestination was improperly comparing hashes of the actions object.
This means that different NavDestination instances would not produce the
same hashcode. This caused issues with our map functions since they work
off hashCodes.
RelNote: "When using Navigation compose, NavGraphs will only be
DESTROYED once all of their children are DESTROYED."
Test: added test
Bug: 198741720
Change-Id: I86552cc841eee95858ff23a1fce895e5d47c9746
M navigation/navigation-common/src/main/java/androidx/navigation/NavDestination.kt
M navigation/navigation-compose/src/androidTest/java/androidx/navigation/compose/NavHostTest.kt
https://android-review.googlesource.com/1820897
Branch: androidx-main
commit ce6b342d81cae6406445d3aef97a927e31d51772
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Sep 08 14:11:03 2021
Fix NavDestination hashCode function
NavDestination was improperly comparing hashes of the actions object.
This means that different NavDestination instances would not produce the
same hashcode. This caused issues with our map functions since they work
off hashCodes.
RelNote: "When using Navigation compose, NavGraphs will only be
DESTROYED once all of their children are DESTROYED."
Test: added test
Bug: 198741720
Change-Id: I86552cc841eee95858ff23a1fce895e5d47c9746
M navigation/navigation-common/src/main/java/androidx/navigation/NavDestination.kt
M navigation/navigation-compose/src/androidTest/java/androidx/navigation/compose/NavHostTest.kt
jb...@google.com <jb...@google.com> #3
This has been fixed internally and will be available in the Navigation 2.4.0-alpha09
release.
Description
Component used: Navigation Version used: Alpha08 Devices/Android versions reproduced on: Android Version 30, Samsung Galaxy S20 Plus
Steps to reproduce:
You cannot access the NavBackStackEntry's ViewModels until it is added to the NavController's back stack (i.e., the Lifecycle of the NavBackStackEntry reaches the CREATED state)