How Best Value works: a Setup Best Value button, and a clean hand-off to Settings
The explanation sheet now carries a full-width button that closes it and the sheet it was opened from, then lands on Settings — whose Best Value section is the first thing in its list, so the controls are on screen on arrival. It uses .controlSize(.large), the standard iOS button height. Both the More info sheet and the Key sheet are presented by StationsView, and FavouritesView presents its own More info sheet — not ContentView's monitor as assumed — so each host closes whichever sheet it owns on the notification. Before this, one of them stayed up over the Settings tab. The button now announces itself half a second after its own dismissal, so the child and parent dismissals cannot race and drop one of the two.
This commit is contained in:
@@ -335,6 +335,14 @@ struct StationDetailView: View {
|
||||
try? await Task.sleep(nanoseconds: 3_000_000_000)
|
||||
withAnimation { proxy.scrollTo("bestValueCard", anchor: .bottom) }
|
||||
}
|
||||
.task {
|
||||
// QA hook: `-qaDetailShowBestValueInfo` opens the explanation from
|
||||
// THIS sheet (the More info path), so the two-sheet dismissal can
|
||||
// be screenshotted — simctl has no tap.
|
||||
guard ProcessInfo.processInfo.arguments.contains("-qaDetailShowBestValueInfo") else { return }
|
||||
try? await Task.sleep(nanoseconds: 1_500_000_000)
|
||||
showBestValueInfo = true
|
||||
}
|
||||
#endif
|
||||
.alert("Report an error?", isPresented: $showingReportIssueConfirmation) {
|
||||
Button("Cancel", role: .cancel) { }
|
||||
|
||||
Reference in New Issue
Block a user