Fix focus issues w/ next/previous

This commit is contained in:
Damontecres 2025-11-12 19:23:04 -05:00
parent 734d5cafd2
commit bbeb1c0488
No known key found for this signature in database
2 changed files with 6 additions and 3 deletions

View file

@ -30,7 +30,10 @@ fun CircularProgress(modifier: Modifier = Modifier) {
* Fill the space with a loading indicator and take focus * Fill the space with a loading indicator and take focus
*/ */
@Composable @Composable
fun LoadingPage(modifier: Modifier = Modifier) { fun LoadingPage(
modifier: Modifier = Modifier,
focusEnabled: Boolean = true,
) {
val focusRequester = remember { FocusRequester() } val focusRequester = remember { FocusRequester() }
LaunchedEffect(Unit) { focusRequester.tryRequestFocus() } LaunchedEffect(Unit) { focusRequester.tryRequestFocus() }
Box( Box(
@ -39,7 +42,7 @@ fun LoadingPage(modifier: Modifier = Modifier) {
modifier modifier
.fillMaxSize() .fillMaxSize()
.focusRequester(focusRequester) .focusRequester(focusRequester)
.focusable(), .focusable(focusEnabled),
) { ) {
CircularProgressIndicator( CircularProgressIndicator(
color = MaterialTheme.colorScheme.border, color = MaterialTheme.colorScheme.border,

View file

@ -257,7 +257,7 @@ fun PlaybackPage(
.matchParentSize() .matchParentSize()
.background(Color.Black), .background(Color.Black),
) { ) {
LoadingPage() LoadingPage(focusEnabled = false)
} }
} }