create ChannelSet datastore

This commit is contained in:
andrekir 2022-09-12 19:07:30 -03:00
parent 382535da47
commit 2ed5548abb
11 changed files with 154 additions and 69 deletions

View file

@ -295,10 +295,10 @@ class SettingsFragment : ScreenFragment("Settings"), Logging {
} else updateNodeInfo()
}
model.channels.observe(viewLifecycleOwner) {
model.channels.asLiveData().observe(viewLifecycleOwner) {
if (!model.isConnected()) {
val channelCount = it?.protobuf?.settingsCount ?: 0
binding.scanStatusText.text = "Channels ($channelCount / 8)"
val channelCount = it.protobuf.settingsCount
if (channelCount > 0) binding.scanStatusText.text = "Channels ($channelCount / 8)"
}
}