mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
feat: add channel editor (#627)
This commit is contained in:
parent
c821eb3681
commit
e5a860cb36
8 changed files with 561 additions and 104 deletions
|
|
@ -42,7 +42,11 @@ class ChannelSetRepository @Inject constructor(
|
|||
|
||||
suspend fun addSettings(channel: ChannelProtos.Channel) {
|
||||
channelSetStore.updateData { preference ->
|
||||
preference.toBuilder().addSettings(channel.settings).build()
|
||||
if (preference.settingsCount > channel.index) {
|
||||
preference.toBuilder().setSettings(channel.index, channel.settings).build()
|
||||
} else {
|
||||
preference.toBuilder().addSettings(channel.settings).build()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue