Run SwiftFormat.

This commit is contained in:
Doug
2026-05-27 14:38:50 +01:00
committed by Doug
parent 5138e05e47
commit fa67713726
573 changed files with 2426 additions and 2426 deletions
@@ -15,12 +15,12 @@ struct VoiceMessageRoomPlaybackView: View {
@ScaledMetric private var waveformLineWidth = 2.0
@ScaledMetric private var waveformLinePadding = 2.0
@GestureState var isDragging = false
let onPlayPause: () -> Void
let onSeek: (Double) -> Void
let onScrubbing: (Bool) -> Void
let onPlaybackSpeedChange: () -> Void
var body: some View {
HStack(spacing: 8) {
VoiceMessageButton(state: .init(playerState.playerButtonPlaybackState),
@@ -36,7 +36,7 @@ struct VoiceMessageRoomPlaybackView: View {
.monospacedDigit()
.fixedSize(horizontal: true, vertical: true)
}
waveformView
.waveformInteraction(isDragging: $isDragging,
progress: playerState.progress,
@@ -62,7 +62,7 @@ struct VoiceMessageRoomPlaybackView: View {
DateFormatter.elapsedTimeFormatter.string(from: duration)
}
}
private var timeLabelContent: String {
// Display the duration if progress is 0.0
let percent = playerState.progress > 0.0 ? playerState.progress : 1.0
@@ -82,7 +82,7 @@ struct VoiceMessageRoomPlaybackView: View {
L10n.a11yVoiceMessage(durationString)
}
}
@ViewBuilder
private var waveformView: some View {
if let url = playerState.fileURL {
@@ -96,7 +96,7 @@ struct VoiceMessageRoomPlaybackView: View {
estimatedWaveformView
}
}
private var estimatedWaveformView: some View {
EstimatedWaveformView(lineWidth: waveformLineWidth,
linePadding: waveformLinePadding,
@@ -111,7 +111,7 @@ private extension DateFormatter {
dateFormatter.dateFormat = "m:ss"
return dateFormatter
}()
static let longElapsedTimeFormatter: DateFormatter = {
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "mm:ss"