Refactor: Improve shared contact import dialog (#1888)

This commit is contained in:
James Rich 2025-05-20 21:57:14 -05:00 committed by GitHub
parent 5a52239721
commit 990cd103d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 198 additions and 70 deletions

View file

@ -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(