Skip to content

Commit

Permalink
await release gesture
Browse files Browse the repository at this point in the history
  • Loading branch information
NieR4ever committed Nov 10, 2024
1 parent 190029d commit 3d92d70
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,11 @@ fun VideoScaffold(
//点击 bottom bar 里的按钮时 请求 always on
alwaysOnRequester.request()
}
val releaseEvent = awaitPointerEvent()
if (releaseEvent.changes.all { !it.pressed }) {
alwaysOnRequester.cancelRequest()
var releaseEvent = awaitPointerEvent()
while (releaseEvent.changes.any { it.pressed }) {
releaseEvent = awaitPointerEvent()
}
alwaysOnRequester.cancelRequest()
}
}
.fillMaxWidth()
Expand Down

0 comments on commit 3d92d70

Please sign in to comment.