mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix/2552 Calculate initial mapView from filtered node list (#2553)
This commit is contained in:
parent
2b5a2be48d
commit
ca02624ad0
3 changed files with 45 additions and 42 deletions
|
|
@ -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> =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue