aboutsummaryrefslogtreecommitdiff
path: root/Map/Presentation/Preferences/StagesPreferencesView.swift
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2025-07-06 12:45:37 +0200
committerRuben Beltran del Rio <git@r.bdr.sh>2025-07-06 12:45:37 +0200
commit54f89bcd1a7fb0b92b65d8c0ea3847d635e11133 (patch)
treeda6c1e3f015c4b21a2e32854cadb09e71f9079e7 /Map/Presentation/Preferences/StagesPreferencesView.swift
parent3cd8f1f7200109d505b5e105d5ebe53f0c93d337 (diff)
Allow adding and removing templates
Diffstat (limited to 'Map/Presentation/Preferences/StagesPreferencesView.swift')
-rw-r--r--Map/Presentation/Preferences/StagesPreferencesView.swift6
1 files changed, 4 insertions, 2 deletions
diff --git a/Map/Presentation/Preferences/StagesPreferencesView.swift b/Map/Presentation/Preferences/StagesPreferencesView.swift
index 1e57cbf..b1ce31c 100644
--- a/Map/Presentation/Preferences/StagesPreferencesView.swift
+++ b/Map/Presentation/Preferences/StagesPreferencesView.swift
@@ -129,7 +129,7 @@ struct StagesPreferencesView: View {
} else {
// First use - create default Cynefin stage
customStages = [CustomStage.cynefinDefault()]
- saveStages() // Save the default to UserDefaults
+ saveStages() // Save the default to UserDefaults
}
}
@@ -156,7 +156,9 @@ struct StagesPreferencesView: View {
}
}
- private func updateStageValue(_ id: UUID, _ keyPath: WritableKeyPath<Stage, String>, _ value: String) {
+ private func updateStageValue(
+ _ id: UUID, _ keyPath: WritableKeyPath<Stage, String>, _ value: String
+ ) {
if let index = customStages.firstIndex(where: { $0.id == id }) {
customStages[index].stage[keyPath: keyPath] = value
saveStages()