automatic resetting of collections

This commit is contained in:
leminlimez committed 2025-06-11 16:13:18 -04:00
1 parent 913110be91
commit 60aa215d6b
3 files changed
+30 -3

No files matched your search

+11 -1
View File
@@ -174,7 +174,17 @@ struct ContentView: View {
.buttonStyle(TintedButton(color: .blue, fullwidth: true))
}
Button(action: {
hideResetHelp = false
guard let lang = UserDefaults.standard.stringArray(forKey: "AppleLanguages")?.first else {
hideResetHelp = false // fallback to tutorial
return
}
UIApplication.shared.confirmAlert(title: "Reset Collections", body: "Do you want to reset collections?", onOK: {
if PosterBoardManager.shared.setSystemLanguage(to: lang) {
UIApplication.shared.alert(title: "Collections Successfully Reset!", body: "Your PosterBoard will refresh automatically.")
} else {
UIApplication.shared.alert(body: "The API failed to call correctly.\nSystem Locale Code: \(lang)")
}
}, noCancel: false)
}) {
Text("Reset Collections")
}