add ModuleConfig settings (#526)

This commit is contained in:
Andre K 2022-11-22 22:01:37 -03:00 committed by GitHub
parent 36cb78a332
commit 689e7e7eca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 938 additions and 74 deletions

View file

@ -310,6 +310,14 @@ class SettingsFragment : ScreenFragment("Settings"), Logging {
} else updateNodeInfo()
}
model.moduleConfig.asLiveData().observe(viewLifecycleOwner) {
if (!model.isConnected()) {
val moduleCount = it.allFields.size
if (moduleCount > 0)
binding.scanStatusText.text = "Module config ($moduleCount / 8)"
} else updateNodeInfo()
}
model.channels.asLiveData().observe(viewLifecycleOwner) {
if (!model.isConnected()) it.protobuf.let { ch ->
if (!ch.hasLoraConfig() && ch.settingsCount > 0)