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

@ -142,10 +142,6 @@ struct StoreForwardConfig: 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
}
// Need to request a Detection Sensor Module Config from the remote node before allowing changes
if bleManager.connectedPeripheral != nil && node?.storeForwardConfig == nil {
Logger.mesh.debug("empty store and forward module config")