From cd0ee611ebf020cf801fa19c192c2f99e7ef8849 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Sat, 4 May 2024 14:27:31 -0700 Subject: [PATCH] Remove positions when removing fixed position --- Meshtastic/Views/Settings/Config/PositionConfig.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Meshtastic/Views/Settings/Config/PositionConfig.swift b/Meshtastic/Views/Settings/Config/PositionConfig.swift index d7d19dc9..729e4964 100644 --- a/Meshtastic/Views/Settings/Config/PositionConfig.swift +++ b/Meshtastic/Views/Settings/Config/PositionConfig.swift @@ -280,6 +280,9 @@ struct PositionConfig: View { print("Set Position Failed") } print("Remove a fixed position here") + let mutablePositions = node?.positions?.mutableCopy() as? NSMutableOrderedSet + mutablePositions?.removeAllObjects() + node?.positions = mutablePositions node?.positionConfig?.fixedPosition = false do { try context.save()