mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Only put delete if not sent logic in one place
This commit is contained in:
parent
afa5789fdf
commit
46e0757f03
1 changed files with 0 additions and 10 deletions
|
|
@ -183,16 +183,6 @@ struct WaypointForm: View {
|
|||
.padding(.bottom)
|
||||
|
||||
Button(role: .cancel) {
|
||||
if waypoint.id == 0 {
|
||||
// New, unsent waypoint created by the user: delete it
|
||||
bleManager.context.delete(waypoint)
|
||||
do {
|
||||
try bleManager.context.save()
|
||||
} catch {
|
||||
bleManager.context.rollback()
|
||||
Logger.mesh.error("Failed to save context on waypoint deletion: \(error)")
|
||||
}
|
||||
}
|
||||
dismiss()
|
||||
} label: {
|
||||
Label("Cancel", systemImage: "x.circle")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue