mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 23:51:21 +02:00
Fix focus issues w/ next/previous
This commit is contained in:
parent
734d5cafd2
commit
bbeb1c0488
2 changed files with 6 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ fun PlaybackPage(
|
|||
.matchParentSize()
|
||||
.background(Color.Black),
|
||||
) {
|
||||
LoadingPage()
|
||||
LoadingPage(focusEnabled = false)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue