mirror of
https://github.com/bbara04/Purefin.git
synced 2026-07-23 19:26:50 +00:00
refactor(player): switch from onPreviewKeyEvent to onKeyEvent
Use onKeyEvent so BackHandler gets priority for back key handling before the composable processes other key events.
This commit is contained in:
@@ -46,7 +46,7 @@ import androidx.compose.ui.input.key.Key
|
||||
import androidx.compose.ui.input.key.KeyEvent
|
||||
import androidx.compose.ui.input.key.KeyEventType
|
||||
import androidx.compose.ui.input.key.key
|
||||
import androidx.compose.ui.input.key.onPreviewKeyEvent
|
||||
import androidx.compose.ui.input.key.onKeyEvent
|
||||
import androidx.compose.ui.input.key.type
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.platform.testTag
|
||||
@@ -248,7 +248,7 @@ fun TvPlayerScreen(
|
||||
.fillMaxSize()
|
||||
.background(Color.Black)
|
||||
.focusRequester(rootFocusRequester)
|
||||
.onPreviewKeyEvent { event ->
|
||||
.onKeyEvent { event ->
|
||||
val handled = handleTvPlayerRootKeyEvent(
|
||||
event = event,
|
||||
controlsVisible = controlsVisible,
|
||||
|
||||
Reference in New Issue
Block a user