mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Content Scanning View (#5831)
* implement a MediaView to delegate at the view level the usage of the content scanner service, to determine how to render the media. * fix for a small design mismatch * fix for greedy error state * updated naming * just making some screenshot that have been affected by a string change on Localazy * pr suggestions + updated strings
This commit is contained in:
@@ -16,6 +16,10 @@ struct VoiceMessageRoomPlaybackView: View {
|
||||
@ScaledMetric private var waveformLinePadding = 2.0
|
||||
@GestureState var isDragging = false
|
||||
|
||||
/// Whether the voice message is being scanned by the content scanner, in which case
|
||||
/// the play button shows a spinner and playback isn't available (which prevents the audio file from being downloaded).
|
||||
var isScanning = false
|
||||
|
||||
let onPlayPause: () -> Void
|
||||
let onSeek: (Double) -> Void
|
||||
let onScrubbing: (Bool) -> Void
|
||||
@@ -23,7 +27,7 @@ struct VoiceMessageRoomPlaybackView: View {
|
||||
|
||||
var body: some View {
|
||||
HStack(spacing: 8) {
|
||||
VoiceMessageButton(state: .init(playerState.playerButtonPlaybackState),
|
||||
VoiceMessageButton(state: isScanning ? .loading : .init(playerState.playerButtonPlaybackState),
|
||||
size: .medium,
|
||||
action: onPlayPause)
|
||||
VStack(spacing: 2) {
|
||||
|
||||
Reference in New Issue
Block a user