mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
Refactor: Improve shared contact import dialog (#1888)
This commit is contained in:
parent
5a52239721
commit
990cd103d7
6 changed files with 198 additions and 70 deletions
|
|
@ -309,6 +309,12 @@ class UIViewModel @Inject constructor(
|
|||
initialValue = NodesUiState.Empty,
|
||||
)
|
||||
|
||||
val unfilteredNodeList: StateFlow<List<Node>> = nodeDB.getNodes().stateIn(
|
||||
scope = viewModelScope,
|
||||
started = SharingStarted.WhileSubscribed(5_000),
|
||||
initialValue = emptyList(),
|
||||
)
|
||||
|
||||
val nodeList: StateFlow<List<Node>> = nodesUiState.flatMapLatest { state ->
|
||||
nodeDB.getNodes(state.sort, state.filter, state.includeUnknown, state.includeUnmessageable)
|
||||
}.stateIn(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue