Defers the creation of the geohashStateFlow until needed

This commit is contained in:
Vitor Pamplona
2026-03-26 11:08:27 -04:00
parent 44c39b01ea
commit 3776f65179
@@ -65,7 +65,7 @@ class LocationState(
}
@OptIn(ExperimentalCoroutinesApi::class)
val geohashStateFlow =
val geohashStateFlow by lazy {
hasLocationPermission
.transformLatest {
if (it) {
@@ -92,4 +92,5 @@ class LocationState(
SharingStarted.WhileSubscribed(5000),
latestLocation,
)
}
}