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
12
12
import androidx.navigation.fragment.FragmentNavigatorDestinationBuilder
13
13
import dev.hotwire.turbo.config.TurboPathConfiguration
14
14
import dev.hotwire.turbo.config.uri
15
- import kotlin.random.Random
15
+ import java.util.*
16
16
import kotlin.reflect.KClass
17
17
import kotlin.reflect.full.findAnnotation
18
18
import kotlin.reflect.full.isSubclassOf
@@ -93,13 +93,13 @@ internal class TurboNavGraphBuilder(
93
93
defaultValue = startLocation
94
94
}
95
95
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
97
97
// graph is unique every time. This lets it be reset/recreated on-demand from
98
98
// `TurboSessionNavHostFragment.reset()`. Replacing an existing nav graph with
99
99
// an identical one would bypass recreating the nav stack from scratch in
100
100
// `NavController.setGraph()`.
101
101
argument(" unique_instance" ) {
102
- defaultValue = Random .nextInt ()
102
+ defaultValue = UUID .randomUUID().toString ()
103
103
}
104
104
}
105
105
}
You can’t perform that action at this time.
0 commit comments