mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Clear database when changeing device
This commit is contained in:
parent
6ea2f244ba
commit
71d0ff535a
2 changed files with 2 additions and 2 deletions
|
|
@ -221,12 +221,12 @@ struct Connect: View {
|
|||
}
|
||||
do {
|
||||
try container.copyPersistentStores(to: url.appendingPathComponent("backup").appendingPathComponent("\(UserDefaults.preferredPeripheralNum)"), overwriting: true)
|
||||
clearCoreDataDatabase(context: context, includeRoutes: true)
|
||||
Logger.data.notice("🗂️ Made a core data backup to backup/\(UserDefaults.preferredPeripheralNum)")
|
||||
|
||||
} catch {
|
||||
Logger.data.error("🗂️ Core data backup copy error: \(error, privacy: .public)")
|
||||
}
|
||||
clearCoreDataDatabase(context: context, includeRoutes: false)
|
||||
}
|
||||
UserDefaults.preferredPeripheralId = selectedPeripherialId
|
||||
self.bleManager.connectTo(peripheral: peripheral.peripheral)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 1198b7dbabf9768cb0143d2897707b4c7a51a5da
|
||||
Subproject commit 0fd5023a0aa67eefdf2292a624e8fbbda4489a6c
|
||||
Loading…
Add table
Add a link
Reference in a new issue