From 58a6ec217f927c4fdcc38c38159188f1498e8120 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Sun, 5 Jul 2026 18:56:14 +0200 Subject: [PATCH] Reshuffle the position of the action buttons on the RecordingView view in the Recording package target. --- .../Styles/Buttons/RecordingButtonStyle.swift | 2 +- .../Recording/Views/RecordingView.swift | 24 ++++++++++--------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Packages/Features/Sources/Recording/Styles/Buttons/RecordingButtonStyle.swift b/Packages/Features/Sources/Recording/Styles/Buttons/RecordingButtonStyle.swift index c009a71..07a2963 100644 --- a/Packages/Features/Sources/Recording/Styles/Buttons/RecordingButtonStyle.swift +++ b/Packages/Features/Sources/Recording/Styles/Buttons/RecordingButtonStyle.swift @@ -136,7 +136,7 @@ private enum Constant { /// The padding constants. enum Padding { /// The base padding between a button's label and its background, before dynamic type scaling. - static let button: CGFloat = 8 + static let button: CGFloat = 16 } /// The size constants. diff --git a/Packages/Features/Sources/Recording/Views/RecordingView.swift b/Packages/Features/Sources/Recording/Views/RecordingView.swift index 518f4c5..e105020 100644 --- a/Packages/Features/Sources/Recording/Views/RecordingView.swift +++ b/Packages/Features/Sources/Recording/Views/RecordingView.swift @@ -80,6 +80,19 @@ public struct RecordingView: View { HStack( spacing: Constant.Spacing.stack ) { + if model.shouldShowActions { + Button { + model.pressedDiscard() + } label: { + Image.Icon.discard + .resizable() + } + .buttonStyle(.recording( + invertStyle: true + )) + .accessibilityLabel(.viewRecordingButtonDiscardLabel) + } + Button { model.pressedMain() } label: { @@ -108,17 +121,6 @@ public struct RecordingView: View { )) .disabled(model.isProcessing) .accessibilityLabel(model.labelSend) - - Button { - model.pressedDiscard() - } label: { - Image.Icon.discard - .resizable() - } - .buttonStyle(.recording( - invertStyle: true - )) - .accessibilityLabel(.viewRecordingButtonDiscardLabel) } } }