mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
Merge branch 'meshtastic:master' into feature/osmand-migration
This commit is contained in:
commit
684bd82772
12 changed files with 51 additions and 33 deletions
|
|
@ -115,6 +115,7 @@ class AdvancedSettingsFragment : ScreenFragment("Advanced Settings"), Logging {
|
|||
.setNeutralButton(R.string.cancel) { _, _ ->
|
||||
}
|
||||
.setPositiveButton(getString(R.string.okay)) { _, _ ->
|
||||
debug("User clicked requestShutdown")
|
||||
model.requestShutdown()
|
||||
}
|
||||
.show()
|
||||
|
|
@ -126,6 +127,7 @@ class AdvancedSettingsFragment : ScreenFragment("Advanced Settings"), Logging {
|
|||
.setNeutralButton(R.string.cancel) { _, _ ->
|
||||
}
|
||||
.setPositiveButton(getString(R.string.okay)) { _, _ ->
|
||||
debug("User clicked requestReboot")
|
||||
model.requestReboot()
|
||||
}
|
||||
.show()
|
||||
|
|
|
|||
|
|
@ -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