mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
feat: show online and total node count in the title bar (#2209)
This commit is contained in:
parent
450014a0f6
commit
c4c115b901
3 changed files with 27 additions and 1 deletions
|
|
@ -403,6 +403,18 @@ class UIViewModel @Inject constructor(
|
|||
initialValue = emptyList(),
|
||||
)
|
||||
|
||||
val onlineNodeCount = nodeDB.onlineNodeCount.stateIn(
|
||||
scope = viewModelScope,
|
||||
started = SharingStarted.WhileSubscribed(5_000),
|
||||
initialValue = 0,
|
||||
)
|
||||
|
||||
val totalNodeCount = nodeDB.totalNodeCount.stateIn(
|
||||
scope = viewModelScope,
|
||||
started = SharingStarted.WhileSubscribed(5_000),
|
||||
initialValue = 0,
|
||||
)
|
||||
|
||||
val filteredNodeList: StateFlow<List<Node>> = nodeList.mapLatest { list ->
|
||||
list.filter { node ->
|
||||
!node.isIgnored
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue