* Real Ack UI and data structure for DM's

* Save canned messages messages to core data
This commit is contained in:
Garth Vander Houwen 2022-12-29 16:26:00 -08:00
parent 7f8821754f
commit 463e8230ee
8 changed files with 329 additions and 6 deletions

View file

@ -261,6 +261,10 @@ struct CannedMessagesConfig: View {
// Should show a saved successfully alert once I know that to be true
// for now just disable the button after a successful save
hasMessagesChanges = false
if !hasChanges {
bleManager.sendReboot(destNum: node!.num)
goBack()
}
}
}
}
@ -282,7 +286,9 @@ struct CannedMessagesConfig: View {
self.inputbrokerEventCw = Int(node?.cannedMessageConfig?.inputbrokerEventCw ?? 0)
self.inputbrokerEventCcw = Int(node?.cannedMessageConfig?.inputbrokerEventCcw ?? 0)
self.inputbrokerEventPress = Int(node?.cannedMessageConfig?.inputbrokerEventPress ?? 0)
self.messages = node?.cannedMessageConfig?.messages ?? ""
self.hasChanges = false
self.hasMessagesChanges = false
}
.onChange(of: configPreset) { newPreset in