From 995913fef349136384e23aff4f7e2532a5fa00a8 Mon Sep 17 00:00:00 2001 From: Barnabas Balogh Date: Wed, 25 Mar 2026 21:03:11 +0100 Subject: [PATCH] Fix TrackButtons to hide PersistentOverlay on outside touch --- .../player/ui/components/TrackSelectionButtons.kt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/hu/bbara/purefin/player/ui/components/TrackSelectionButtons.kt b/app/src/main/java/hu/bbara/purefin/player/ui/components/TrackSelectionButtons.kt index 4e95fe6..227cd01 100644 --- a/app/src/main/java/hu/bbara/purefin/player/ui/components/TrackSelectionButtons.kt +++ b/app/src/main/java/hu/bbara/purefin/player/ui/components/TrackSelectionButtons.kt @@ -142,12 +142,7 @@ private fun TrackSelectionPanel( .fillMaxHeight() .windowInsetsPadding(WindowInsets.safeDrawing) .navigationBarsPadding() - .padding(horizontal = 16.dp, vertical = 12.dp) - .clickable( - interactionSource = remember { MutableInteractionSource() }, - indication = null, - onClick = { /* Prevent clicks from bubbling */ } - ), + .padding(horizontal = 16.dp, vertical = 12.dp), contentAlignment = Alignment.BottomEnd ) { Surface( @@ -158,7 +153,12 @@ private fun TrackSelectionPanel( minHeight = 220.dp, maxHeight = 360.dp ) - .clip(RoundedCornerShape(topStart = 24.dp, topEnd = 24.dp, bottomStart = 24.dp)), + .clip(RoundedCornerShape(topStart = 24.dp, topEnd = 24.dp, bottomStart = 24.dp)) + .clickable( + interactionSource = remember { MutableInteractionSource() }, + indication = null, + onClick = { /* Consume taps inside the panel so outside taps dismiss the overlay. */ } + ), color = scheme.surface.copy(alpha = 0.97f) ) { Column(