mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
add connection feedback
This commit is contained in:
parent
69f311e133
commit
d5c32407ad
1 changed files with 11 additions and 1 deletions
|
|
@ -281,7 +281,17 @@ class SettingsFragment : ScreenFragment("Settings"), Logging {
|
|||
}
|
||||
|
||||
model.localConfig.observe(viewLifecycleOwner) {
|
||||
updateNodeInfo()
|
||||
if (!model.isConnected()) {
|
||||
val configCount = it.allFields.size
|
||||
binding.scanStatusText.text = "Device config ($configCount / 7)"
|
||||
} else updateNodeInfo()
|
||||
}
|
||||
|
||||
model.channels.observe(viewLifecycleOwner) {
|
||||
if (!model.isConnected()) {
|
||||
val channelCount = it?.protobuf?.settingsCount ?: 0
|
||||
binding.scanStatusText.text = "Channels ($channelCount / 8)"
|
||||
}
|
||||
}
|
||||
|
||||
// Also watch myNodeInfo because it might change later
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue