diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/types/MusicTrack.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/types/MusicTrack.kt index f8c89445e4..56a0657fe0 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/types/MusicTrack.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/types/MusicTrack.kt @@ -137,7 +137,34 @@ fun MusicTrackHeader( } Column(MaterialTheme.colorScheme.replyModifier) { - MusicTrackCover(image, note, accountViewModel) + if (playableUri != null) { + if (image != null) { + LoadThumbAndThenVideoView( + videoUri = playableUri, + mimeType = mimeType, + title = title, + thumbUri = image, + authorName = note.author?.toBestDisplayName(), + roundedCorner = true, + contentScale = ContentScale.FillWidth, + nostrUriCallback = "nostr:${note.toNEvent()}", + accountViewModel = accountViewModel, + ) + } else { + VideoView( + videoUri = playableUri, + mimeType = mimeType, + title = title, + authorName = note.author?.toBestDisplayName(), + roundedCorner = true, + contentScale = ContentScale.FillWidth, + nostrUriCallback = "nostr:${note.toNEvent()}", + accountViewModel = accountViewModel, + ) + } + } else { + MusicTrackCover(image, note, accountViewModel) + } Column( modifier = @@ -195,36 +222,6 @@ fun MusicTrackHeader( } } - if (playableUri != null) { - Spacer(Modifier.padding(top = 4.dp)) - Box(Modifier.fillMaxWidth().clip(RoundedCornerShape(10.dp))) { - if (image != null) { - LoadThumbAndThenVideoView( - videoUri = playableUri, - mimeType = mimeType, - title = title, - thumbUri = image, - authorName = note.author?.toBestDisplayName(), - roundedCorner = true, - contentScale = ContentScale.FillWidth, - nostrUriCallback = "nostr:${note.toNEvent()}", - accountViewModel = accountViewModel, - ) - } else { - VideoView( - videoUri = playableUri, - mimeType = mimeType, - title = title, - authorName = note.author?.toBestDisplayName(), - roundedCorner = true, - contentScale = ContentScale.FillWidth, - nostrUriCallback = "nostr:${note.toNEvent()}", - accountViewModel = accountViewModel, - ) - } - } - } - description?.takeIf { !makeItShort }?.let { Spacer(Modifier.padding(top = 4.dp)) val tags = remember(noteEvent) { noteEvent.tags.toImmutableListOfLists() } @@ -291,24 +288,6 @@ private fun MusicTrackCover( } else { DefaultImageHeader(note, accountViewModel, imageModifier) } - - Box( - modifier = - Modifier - .align(Alignment.BottomEnd) - .padding(12.dp) - .size(56.dp) - .clip(CircleShape) - .background(MaterialTheme.colorScheme.primary.copy(alpha = 0.92f)), - contentAlignment = Alignment.Center, - ) { - Icon( - symbol = MaterialSymbols.PlayArrow, - contentDescription = null, - tint = MaterialTheme.colorScheme.onPrimary, - modifier = Modifier.size(32.dp), - ) - } } }