fix/2552 Calculate initial mapView from filtered node list (#2553)

This commit is contained in:
Tristan Waddington 2025-07-29 11:00:08 -07:00 committed by GitHub
parent 2b5a2be48d
commit ca02624ad0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 45 additions and 42 deletions

View file

@ -452,15 +452,6 @@ constructor(
initialValue = 0,
)
val filteredNodeList: StateFlow<List<Node>> =
nodeList
.mapLatest { list -> list.filter { node -> !node.isIgnored } }
.stateIn(
scope = viewModelScope,
started = SharingStarted.WhileSubscribed(5_000),
initialValue = emptyList(),
)
data class MapFilterState(val onlyFavorites: Boolean, val showWaypoints: Boolean, val showPrecisionCircle: Boolean)
val mapFilterStateFlow: StateFlow<MapFilterState> =