commit 3f09e1eda93fbc93930527aae9f142ac9624024b
parent e1aef93a912f6a841ae9c8cda1a97337a6540531
Author: Michael Camilleri <[email protected]>
Date: Sat, 17 Oct 2026 04:35:13 +0900
Remove skip button
Diffstat
| M | Reportage/Views/Survey/SurveyView.swift | | | 19 | ++++++------------- |
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/Reportage/Views/Survey/SurveyView.swift b/Reportage/Views/Survey/SurveyView.swift
@@ -101,7 +101,6 @@ struct SurveyView: View {
isLastQuestion: model.isLastQuestion,
isSaving: isSaving,
onBack: { withAnimation { model.goBack() } },
- onSkip: skip,
onNext: next
)
}
@@ -134,11 +133,6 @@ struct SurveyView: View {
}
}
- private func skip() {
- model.clearCurrent()
- next()
- }
-
private func next() {
if model.isLastQuestion {
save()
@@ -236,17 +230,17 @@ struct NoQuestions: View {
}
}
-/// Back, Skip, and Next (or Done on the last question).
+/// Back, and Next (or Done on the last question). Next on an unanswered
+/// question skips it.
struct SurveyControls: View {
let canGoBack: Bool
let isLastQuestion: Bool
let isSaving: Bool
let onBack: () -> Void
- let onSkip: () -> Void
let onNext: () -> Void
var body: some View {
- HStack(spacing: 12) {
+ HStack(spacing: 0) {
Button("Back", systemImage: "chevron.backward", action: onBack)
.labelStyle(.iconOnly)
.font(.body.weight(.semibold))
@@ -254,14 +248,13 @@ struct SurveyControls: View {
.overlay(Circle().strokeBorder(Theme.ink, lineWidth: 1.5))
.opacity(canGoBack ? 1 : 0.3)
.disabled(!canGoBack)
- Button("Skip", action: onSkip)
- .foregroundStyle(Theme.muted)
- .frame(minWidth: 52, minHeight: 52)
+ Spacer(minLength: 24)
Button(action: onNext) {
Text(isLastQuestion ? "Done" : "Next")
.font(.body.weight(.semibold))
.foregroundStyle(Theme.onAccent)
- .frame(maxWidth: .infinity, minHeight: 52)
+ .padding(.horizontal, 36)
+ .frame(minHeight: 52)
.background(Theme.accent, in: .capsule)
}
}