File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
turbo/src/main/kotlin/dev/hotwire/turbo/nav Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import androidx.navigation.fragment.FragmentNavigator
1212import androidx.navigation.fragment.FragmentNavigatorDestinationBuilder
1313import dev.hotwire.turbo.config.TurboPathConfiguration
1414import dev.hotwire.turbo.config.uri
15- import kotlin.random.Random
15+ import java.util.*
1616import kotlin.reflect.KClass
1717import kotlin.reflect.full.findAnnotation
1818import kotlin.reflect.full.isSubclassOf
@@ -93,13 +93,13 @@ internal class TurboNavGraphBuilder(
9393 defaultValue = startLocation
9494 }
9595
96- // Use a random number to represent a unique instance of the graph, so the
96+ // Use a random value to represent a unique instance of the graph, so the
9797 // graph is unique every time. This lets it be reset/recreated on-demand from
9898 // `TurboSessionNavHostFragment.reset()`. Replacing an existing nav graph with
9999 // an identical one would bypass recreating the nav stack from scratch in
100100 // `NavController.setGraph()`.
101101 argument(" unique_instance" ) {
102- defaultValue = Random .nextInt ()
102+ defaultValue = UUID .randomUUID().toString ()
103103 }
104104 }
105105 }
You can’t perform that action at this time.
0 commit comments