Set saved values

This commit is contained in:
Garth Vander Houwen 2024-08-11 08:09:00 -07:00
parent 7b4a3ec648
commit 3acca7ddcb

View file

@ -154,6 +154,18 @@ struct SecurityConfig: View {
ZStack {
ConnectedDevice(bluetoothOn: bleManager.isSwitchedOn, deviceConnected: bleManager.connectedPeripheral != nil, name: (bleManager.connectedPeripheral != nil) ? bleManager.connectedPeripheral.shortName : "?")
})
.onAppear {
setSecurityValues()
// Need to request a LoRaConfig from the remote node before allowing changes
// if bleManager.connectedPeripheral != nil && node?.securityConfig == nil {
// Logger.mesh.info("empty security config")
// let connectedNode = getNodeInfo(id: bleManager.connectedPeripheral?.num ?? 0, context: context)
// if node != nil && connectedNode != nil {
// _ = bleManager.requestSecurityyConfig(fromUser: connectedNode!.user!, toUser: node!.user!, adminIndex: connectedNode?.myInfo?.adminIndex ?? 0)
// }
// }
}
.onChange(of: boolValues) { _ in
hasChanges = true
}