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
*/
@Composable
fun LoadingPage(modifier: Modifier = Modifier) {
fun LoadingPage(
modifier: Modifier = Modifier,
focusEnabled: Boolean = true,
) {
val focusRequester = remember { FocusRequester() }
LaunchedEffect(Unit) { focusRequester.tryRequestFocus() }
Box(
@ -39,7 +42,7 @@ fun LoadingPage(modifier: Modifier = Modifier) {
modifier
.fillMaxSize()
.focusRequester(focusRequester)
.focusable(),
.focusable(focusEnabled),
) {
CircularProgressIndicator(
color = MaterialTheme.colorScheme.border,

View file

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