From 7045950665e54eef6cb8fe2ae3abe0d22db9b81b Mon Sep 17 00:00:00 2001 From: Malopieds Date: Fri, 22 Mar 2024 23:10:05 +0100 Subject: [PATCH] fix(thumbnail): closes #7 --- .../main/java/com/zionhuang/music/ui/player/Thumbnail.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/zionhuang/music/ui/player/Thumbnail.kt b/app/src/main/java/com/zionhuang/music/ui/player/Thumbnail.kt index 79f7f79f7..3e1c779e1 100644 --- a/app/src/main/java/com/zionhuang/music/ui/player/Thumbnail.kt +++ b/app/src/main/java/com/zionhuang/music/ui/player/Thumbnail.kt @@ -72,6 +72,7 @@ fun Thumbnail( } DisposableEffect(showLyrics) { + println(currentWindowIndex) currentView.keepScreenOn = showLyrics onDispose { currentView.keepScreenOn = false @@ -107,11 +108,10 @@ fun Thumbnail( val model = if (currentWindowIndex == index){ mediaMetadata?.thumbnailUrl } else { - windows[index].mediaItem.metadata?.thumbnailUrl + windows[currentWindowIndex].mediaItem.metadata?.thumbnailUrl } AsyncImage( - model = windows[index].mediaItem.metadata?.thumbnailUrl, -// model = model, + model = model, contentDescription = null, modifier = Modifier .fillMaxWidth()