Skip to content

Commit

Permalink
修复无法隐藏 controller (#1186)
Browse files Browse the repository at this point in the history
await release gesture
  • Loading branch information
NieR4ever authored Nov 10, 2024
1 parent a6535ed commit f51e05d
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 f51e05d

Please sign in to comment.