Refactor BLEManager.context setting on all the views, and just do that at the app root instead

This commit is contained in:
Blake McAnally 2024-07-14 00:42:11 -05:00
parent 3a746af27e
commit fbf059be6a
42 changed files with 90 additions and 221 deletions

View file

@ -133,9 +133,6 @@ struct SerialConfig: View {
ConnectedDevice(bluetoothOn: bleManager.isSwitchedOn, deviceConnected: bleManager.connectedPeripheral != nil, name: (bleManager.connectedPeripheral != nil) ? bleManager.connectedPeripheral.shortName : "?")
})
.onAppear {
if self.bleManager.context == nil {
self.bleManager.context = context
}
setSerialValues()
// Need to request a SerialModuleConfig from the remote node before allowing changes
if bleManager.connectedPeripheral != nil && node?.serialConfig == nil {