feat: add fixed_position to config import/export

This commit is contained in:
andrekir 2024-10-09 19:41:05 -03:00 committed by Andre K
parent 0062d38c8b
commit aa84d47375
5 changed files with 64 additions and 35 deletions

View file

@ -372,7 +372,7 @@ class RadioConfigViewModel @Inject constructor(
.setShortName(if (hasShortName()) shortName else it.shortName)
.setIsLicensed(it.isLicensed)
.build()
if (it != user) setOwner(user)
setOwner(user)
}
if (hasChannelUrl()) try {
setChannels(channelUrl)
@ -389,6 +389,9 @@ class RadioConfigViewModel @Inject constructor(
setConfig(newConfig)
}
}
if (hasFixedPosition()) {
setFixedPosition(myNodeNum!!, Position(fixedPosition))
}
if (hasModuleConfig()) {
val descriptor = ModuleConfigProtos.ModuleConfig.getDescriptor()
moduleConfig.allFields.forEach { (field, value) ->