Onboarding: show green tick on Local Network page before advancing
The probe result landed while the Local Network prompt was still dismissing, so the granted tick was skipped and the page jumped straight to the final slide. Hold 'Connected — prices will load' on screen for a beat before auto-advancing, matching the visible tick flow of the Location and Notifications pages.
This commit is contained in:
@@ -57,7 +57,17 @@ struct OnboardingView: View {
|
|||||||
if granted, page == 2 { page = 3 }
|
if granted, page == 2 { page = 3 }
|
||||||
}
|
}
|
||||||
.onChange(of: prompter.dataGranted) { _, granted in
|
.onChange(of: prompter.dataGranted) { _, granted in
|
||||||
if granted, page == 3 { page = 4 }
|
if granted, page == 3 {
|
||||||
|
// The probe result lands while the Local Network prompt is
|
||||||
|
// still dismissing, so without a beat the green "Connected"
|
||||||
|
// tick is skipped and the page jumps straight to Done —
|
||||||
|
// unlike the Location/Notifications pages where the granted
|
||||||
|
// tick is visible. Hold the tick on screen, then advance.
|
||||||
|
Task { @MainActor in
|
||||||
|
try? await Task.sleep(nanoseconds: 800_000_000)
|
||||||
|
if page == 3 { page = 4 }
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.background(
|
.background(
|
||||||
LinearGradient(
|
LinearGradient(
|
||||||
|
|||||||
Reference in New Issue
Block a user