fix(data): Persist TAK module config (#5933)

This commit is contained in:
Jeremiah K authored and GitHub committed 2026-06-24 17:04:55 +00:00
1 parent f1a7982a4d
commit 45a27ab5d9
2 files changed
+4

No files matched your search

@@ -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
}
}