Skip to content

Unofficial YouTube Music / Spotify Premium client for Android, built in Liquid Glass. Audio effects, Spotify Connect, listening history, 8 languages. Rust core on librespot.

Wait for a track before opening the player; drop the cover stand-in

Lelonioe79ebf4aaf0b
diff --git a/.claude/settings.local.json b/.claude/settings.local.json
index 56b1fb4..c06340e 100644
--- a/.claude/settings.local.json
+++ b/.claude/settings.local.json
@@ -121,7 +121,8 @@
"Bash(git commit -q -m 'Relink playlist tracks to this market; icon-only track menu *)",
"Bash(git commit -q -m 'A modal track sheet, and reverb that stops with playback *)",
"Bash(git commit -q -m 'Blur the sheet harder than the page; stop reverb on pause *)",
- "Bash(git commit -q -m 'Reverb released on pause, notification opens the player, no black Canvas *)"
+ "Bash(git commit -q -m 'Reverb released on pause, notification opens the player, no black Canvas *)",
+ "Bash(git commit -q -m 'Wait for a track before opening the player; drop the cover stand-in *)"
]
}
}
diff --git a/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/configure_fingerprint.bin b/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/configure_fingerprint.bin
index 800fc35..7830d1e 100644
--- a/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/configure_fingerprint.bin
+++ b/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/configure_fingerprint.bin
@@ -2,27 +2,27 @@ C/C++ Structured Logl
j
h/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/additional_project_files.txtC
A
-?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  �����3  ����3i
+?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  �����3  ����3i
g
-e/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/android_gradle_build.json  �����3� ����3n
+e/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/android_gradle_build.json  �����3� ����3n
l
-j/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/android_gradle_build_mini.json  �����3� �����3[
+j/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/android_gradle_build_mini.json  �����3� �����3[
Y
-W/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/build.ninja  �����3�� ����3_
+W/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/build.ninja  �����3�� ����3_
]
-[/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/build.ninja.txt  �����3d
+[/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/build.ninja.txt  �����3d
b
-`/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/build_file_index.txt  �����3 @ ����3e
+`/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/build_file_index.txt  �����3 @ ����3e
c
-a/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/compile_commands.json  �����3�� ����3i
+a/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/compile_commands.json  �����3�� ����3i
g
-e/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/compile_commands.json.bin  �����3 �" ����3o
+e/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/compile_commands.json.bin  �����3 �" ����3o
m
-k/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/metadata_generation_command.txt  �����3
+k/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/metadata_generation_command.txt  �����3
� ����3b
`
-^/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/prefab_config.json  �����3  ( ����3g
+^/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/prefab_config.json  �����3  ( ����3g
e
-c/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/symbol_folder_index.txt  �����3  b ����3D
+c/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/symbol_folder_index.txt  �����3  b ����3D
B
-@/Users/emanuele/Progetto Spotify/app/src/main/cpp/CMakeLists.txt  �����3 � �Ȅ��3
\ No newline at end of file
+@/Users/emanuele/Progetto Spotify/app/src/main/cpp/CMakeLists.txt  �����3 � �Ȅ��3
\ No newline at end of file
diff --git a/app/src/main/java/dev/emanuele/spot/ui/SpotApp.kt b/app/src/main/java/dev/emanuele/spot/ui/SpotApp.kt
index 2e8242c..9f090aa 100644
--- a/app/src/main/java/dev/emanuele/spot/ui/SpotApp.kt
+++ b/app/src/main/java/dev/emanuele/spot/ui/SpotApp.kt
@@ -208,11 +208,21 @@ fun SpotApp(
val expand = remember { Animatable(0f) }
val scope = rememberCoroutineScope()
- // Opened from outside — a tap on the media notification. Skipped on the
- // first composition of a launch that did not ask for it, since the counter
- // starts at zero.
+ // Opened from outside — a tap on the media notification.
+ //
+ // Held as a pending request rather than acted on immediately: the media
+ // controller connects a moment after the activity starts, so a launch
+ // straight from the notification arrives here with no track yet and the
+ // player would have nothing to open onto. This waits for one.
+ var pendingOpen by remember { mutableStateOf(false) }
LaunchedEffect(openPlayer) {
- if (openPlayer > 0 && playback.hasItem) expand.animateTo(1f, expandSpec)
+ if (openPlayer > 0) pendingOpen = true
+ }
+ LaunchedEffect(pendingOpen, playback.hasItem) {
+ if (pendingOpen && playback.hasItem) {
+ pendingOpen = false
+ expand.animateTo(1f, expandSpec)
+ }
}
// Measured rather than assumed. The constant this replaced was 62dp while
diff --git a/app/src/main/java/dev/emanuele/spot/ui/player/PlayerScreen.kt b/app/src/main/java/dev/emanuele/spot/ui/player/PlayerScreen.kt
index 7d895b0..474cc5a 100644
--- a/app/src/main/java/dev/emanuele/spot/ui/player/PlayerScreen.kt
+++ b/app/src/main/java/dev/emanuele/spot/ui/player/PlayerScreen.kt
@@ -232,12 +232,12 @@ fun PlayerScreen(
modifier = Modifier.fillMaxSize(),
)
- clip.isVideo -> AsyncImage(
- model = state.artworkUrl,
- contentDescription = null,
- contentScale = ContentScale.Crop,
- modifier = Modifier.fillMaxSize(),
- )
+ // Nothing at all, rather than the cover: what shows through
+ // is the app's own blurred artwork, which is the same
+ // picture out of focus and reads as the clip softening for a
+ // moment. Dropping a sharp cover in for the length of the
+ // animation was worse than the black rectangle it fixed.
+ clip.isVideo -> Unit
// A handful of canvases are stills rather than clips.
else -> AsyncImage(