mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix: loadCachedDb() before backfill to ensure in-mem nodedb isn't stale, show filtered count in nodelist (#3827)
This commit is contained in:
parent
4cecc578d8
commit
500ae49b2c
4 changed files with 10 additions and 5 deletions
|
|
@ -367,6 +367,7 @@ private fun UpdateUnreadCountPaged(
|
|||
}
|
||||
.debounce(timeoutMillis = UnreadUiDefaults.SCROLL_DEBOUNCE_MILLIS)
|
||||
.collectLatest { index ->
|
||||
// Only mark messages as read if we have a valid index (screen is visible and not scrolling)
|
||||
if (index != null) {
|
||||
val lastUnreadIndex = findLastUnreadMessageIndex(messages)
|
||||
// If we're at/past the oldest unread, mark the first visible unread message
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ fun NodeListScreen(
|
|||
topBar = {
|
||||
MainAppBar(
|
||||
title = stringResource(Res.string.nodes),
|
||||
subtitle = stringResource(Res.string.node_count_template, onlineNodeCount, totalNodeCount),
|
||||
subtitle = stringResource(Res.string.node_count_template, onlineNodeCount, nodes.size, totalNodeCount),
|
||||
ourNode = ourNode,
|
||||
showNodeChip = false,
|
||||
canNavigateUp = false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue