Refine onboarding permission flow
This commit is contained in:
@@ -241,9 +241,7 @@ struct OnboardingView: View {
|
||||
case 0:
|
||||
primaryButton(String(localized: "Continue", comment: "Onboarding continue button")) { page = 1 }
|
||||
case 1:
|
||||
primaryButton(
|
||||
prompter.locationDenied ? String(localized: "Open Settings", comment: "Open iOS Settings button") : (prompter.locationGranted ? String(localized: "Continue", comment: "Onboarding continue button") : String(localized: "Allow Location Access", comment: "Request location permission button"))
|
||||
) {
|
||||
primaryButton(String(localized: "Continue", comment: "Onboarding continue button")) {
|
||||
if prompter.locationDenied {
|
||||
openSettings()
|
||||
} else if prompter.locationGranted {
|
||||
@@ -253,14 +251,12 @@ struct OnboardingView: View {
|
||||
// screen (after it's been read) and BEFORE advancing — so
|
||||
// the prompt never covers the next page's animation. Auto-
|
||||
// advance on grant moves us on once the user responds;
|
||||
// denying leaves the page's "Open Settings" path.
|
||||
// denying leaves the page's Settings path.
|
||||
prompter.requestLocation()
|
||||
}
|
||||
}
|
||||
case 2:
|
||||
primaryButton(
|
||||
prompter.notificationsDenied ? String(localized: "Continue without alerts", comment: "Continue after notification permission denied") : (prompter.notificationsGranted ? String(localized: "Continue", comment: "Onboarding continue button") : String(localized: "Allow Notifications", comment: "Request notifications permission button"))
|
||||
) {
|
||||
primaryButton(String(localized: "Continue", comment: "Onboarding continue button")) {
|
||||
if prompter.notificationsDenied || prompter.notificationsGranted {
|
||||
page = 3 // decided either way — move on
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user