Преглед изворни кода

fix: 修复听书播放器蒙版点击穿透

lingran7031 пре 3 месеци
родитељ
комит
28597a2d67

+ 3 - 0
app/src/main/java/io/legado/app/ui/book/readaloud/player/ReadAloudPlayerScreen.kt

@@ -17,6 +17,7 @@ import androidx.compose.foundation.clickable
 import androidx.compose.foundation.gestures.Orientation
 import androidx.compose.foundation.gestures.animateScrollBy
 import androidx.compose.foundation.gestures.detectHorizontalDragGestures
+import androidx.compose.foundation.gestures.detectTapGestures
 import androidx.compose.foundation.layout.Arrangement
 import androidx.compose.foundation.layout.Box
 import androidx.compose.foundation.layout.Column
@@ -195,6 +196,7 @@ fun ReadAloudPlayerScreenContent(
                     .fillMaxWidth()
                     .clip(RectangleShape)
                     .then(hazeModifier)
+                    .pointerInput(Unit) { detectTapGestures(onTap = {}) }
                     .windowInsetsPadding(WindowInsets.statusBars),
             ) {
                 Row(
@@ -256,6 +258,7 @@ fun ReadAloudPlayerScreenContent(
                         .fillMaxWidth()
                         .clip(RectangleShape)
                         .then(hazeModifier)
+                        .pointerInput(Unit) { detectTapGestures(onTap = {}) }
                         .windowInsetsPadding(WindowInsets.navigationBars)
                         .padding(vertical = 8.dp),
                     horizontalAlignment = Alignment.CenterHorizontally,