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.

Let the bar itself handle a press on the tab already selected

Lelonio93a625565d8f
diff --git a/app/.cxx/Debug/286k5v33/arm64-v8a/configure_fingerprint.bin b/app/.cxx/Debug/286k5v33/arm64-v8a/configure_fingerprint.bin
index 666e3e9..5824847 100644
--- a/app/.cxx/Debug/286k5v33/arm64-v8a/configure_fingerprint.bin
+++ b/app/.cxx/Debug/286k5v33/arm64-v8a/configure_fingerprint.bin
@@ -2,27 +2,27 @@ C/C++ Structured Logc
a
_/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/additional_project_files.txtC
A
-?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  �����3  ��߈�3`
+?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  �����3  ��߈�3`
^
-\/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/android_gradle_build.json  �����3� ��߈�3e
+\/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/android_gradle_build.json  �����3� ��߈�3e
c
-a/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/android_gradle_build_mini.json  �����3� ��߈�3R
+a/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/android_gradle_build_mini.json  �����3� ��߈�3R
P
-N/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/build.ninja  �����3� ��߈�3V
+N/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/build.ninja  �����3� ��߈�3V
T
-R/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/build.ninja.txt  �����3[
+R/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/build.ninja.txt  �����3[
Y
-W/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/build_file_index.txt  �����3 @ ��߈�3\
+W/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/build_file_index.txt  �����3 @ ��߈�3\
Z
-X/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/compile_commands.json  �����3֚ ��߈�3`
+X/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/compile_commands.json  �����3֚ ��߈�3`
^
-\/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/compile_commands.json.bin  �����3 �" ��߈�3f
+\/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/compile_commands.json.bin  �����3 �" ��߈�3f
d
-b/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/metadata_generation_command.txt  �����3
+b/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/metadata_generation_command.txt  �����3
� ��߈�3Y
W
-U/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/prefab_config.json  �����3  ( ��߈�3^
+U/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/prefab_config.json  �����3  ( ��߈�3^
\
-Z/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/symbol_folder_index.txt  �����3  Y ��߈�3D
+Z/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/symbol_folder_index.txt  �����3  Y ��߈�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 11b55dd..4fe9d4e 100644
--- a/app/src/main/java/dev/emanuele/spot/ui/SpotApp.kt
+++ b/app/src/main/java/dev/emanuele/spot/ui/SpotApp.kt
@@ -770,32 +770,6 @@ private fun BottomBar(
verticalAlignment = Alignment.CenterVertically,
) {
Box(Modifier.weight(1f)) {
- // On any screen that is not one of the tabs, taps on them have to
- // be caught here rather than by the bar.
- //
- // The bar draws its sliding indicator *over* the selected tab, and
- // that indicator carries the drag gesture, so it swallows taps on
- // whatever it is sitting on. Off the tabs the selection falls back
- // to the last one used — so tapping it hit the indicator, matched
- // the index the bar already held, and produced no event at all.
- // That was search not closing, and a playlist or the settings not
- // going back to the page the tab stands for.
- if (routeIndex < 0) {
- Row(Modifier.matchParentSize().zIndex(1f)) {
- routes.forEach { tab ->
- Box(
- Modifier
- .weight(1f)
- .fillMaxHeight()
- .clickable(
- interactionSource = null,
- indication = null,
- ) { onSelect(tab) },
- )
- }
- }
- }
-
LiquidBottomTabs(
selectedTabIndex = selectedTabIndex,
onTabSelected = { onSelect(routes[it]) },
diff --git a/app/src/main/java/dev/emanuele/spot/ui/glass/LiquidBottomTabs.kt b/app/src/main/java/dev/emanuele/spot/ui/glass/LiquidBottomTabs.kt
index ab5c269..20ff492 100644
--- a/app/src/main/java/dev/emanuele/spot/ui/glass/LiquidBottomTabs.kt
+++ b/app/src/main/java/dev/emanuele/spot/ui/glass/LiquidBottomTabs.kt
@@ -130,6 +130,16 @@ fun LiquidBottomTabs(
onDragStarted = {},
onDragStopped = {
val targetIndex = targetValue.fastRoundToInt().fastCoerceIn(0, tabsCount - 1)
+ // LOCAL CHANGE: report a press that lands on the tab that is
+ // already selected.
+ //
+ // Selection is reported by watching `currentIndex` change,
+ // so releasing on the current tab reported nothing at all.
+ // On a screen that is not a tab — a playlist, the settings,
+ // search — the bar still shows one of them as selected, and
+ // that is exactly the tab you press to get back to it. The
+ // press animated and then did nothing.
+ if (targetIndex == currentIndex) onTabSelected(targetIndex)
currentIndex = targetIndex
animateToValue(targetIndex.toFloat())
animationScope.launch {