mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
refactor: convert ChannelSet to protobuf extensions
This commit is contained in:
parent
3288b07e5e
commit
4e7ea67da0
9 changed files with 103 additions and 116 deletions
|
|
@ -313,10 +313,10 @@ class SettingsFragment : ScreenFragment("Settings"), Logging {
|
|||
}
|
||||
|
||||
model.channels.asLiveData().observe(viewLifecycleOwner) {
|
||||
if (!model.isConnected()) it.protobuf.let { ch ->
|
||||
if (!model.isConnected()) {
|
||||
val maxChannels = model.maxChannels
|
||||
if (!ch.hasLoraConfig() && ch.settingsCount > 0)
|
||||
scanModel.setErrorText("Channels (${ch.settingsCount} / $maxChannels)")
|
||||
if (!it.hasLoraConfig() && it.settingsCount > 0)
|
||||
scanModel.setErrorText("Channels (${it.settingsCount} / $maxChannels)")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue