mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-06-25 22:15:33 -04:00
fix(data): Persist TAK module config (#5933)
This commit is contained in:
@@ -130,5 +130,6 @@ private fun ModuleConfig.summarize(): String = when {
|
||||
detection_sensor != null -> "detection_sensor"
|
||||
paxcounter != null -> "paxcounter"
|
||||
statusmessage != null -> "statusmessage"
|
||||
tak != null -> "tak"
|
||||
else -> "unknown"
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ class ModuleConfigDataSource(
|
||||
}
|
||||
|
||||
/** Updates [LocalModuleConfig] from each [ModuleConfig] oneOf. */
|
||||
@Suppress("CyclomaticComplexMethod")
|
||||
suspend fun setLocalModuleConfig(config: ModuleConfig) = moduleConfigStore.updateData { current ->
|
||||
when {
|
||||
config.mqtt != null -> current.copy(mqtt = config.mqtt)
|
||||
@@ -78,6 +79,8 @@ class ModuleConfigDataSource(
|
||||
|
||||
config.statusmessage != null -> current.copy(statusmessage = config.statusmessage)
|
||||
|
||||
config.tak != null -> current.copy(tak = config.tak)
|
||||
|
||||
else -> current
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user