mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Clear database after disconnecting device
This commit is contained in:
parent
3cc507ce0f
commit
219db29f3d
1 changed files with 1 additions and 5 deletions
|
|
@ -78,7 +78,6 @@ struct DeviceConfig: View {
|
|||
if !bleManager.sendNodeDBReset(destNum: bleManager.connectedPeripheral.num) {
|
||||
print("NodeDB Reset Failed")
|
||||
} else {
|
||||
// Disconnect from device as we are going to wipe the app database now
|
||||
bleManager.disconnectPeripheral()
|
||||
clearCoreDataDatabase(context: context)
|
||||
}
|
||||
|
|
@ -100,13 +99,10 @@ struct DeviceConfig: View {
|
|||
Button("Factory reset your device and app? ", role: .destructive) {
|
||||
|
||||
if !bleManager.sendFactoryReset(destNum: bleManager.connectedPeripheral.num) {
|
||||
|
||||
print("Factory Reset Failed")
|
||||
} else {
|
||||
clearCoreDataDatabase(context: context)
|
||||
// Disconnect from device
|
||||
bleManager.disconnectPeripheral()
|
||||
|
||||
clearCoreDataDatabase(context: context)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue