mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 15:50:16 +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
|
* 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,
|
||||||
|
|
|
||||||
|
|
@ -257,7 +257,7 @@ fun PlaybackPage(
|
||||||
.matchParentSize()
|
.matchParentSize()
|
||||||
.background(Color.Black),
|
.background(Color.Black),
|
||||||
) {
|
) {
|
||||||
LoadingPage()
|
LoadingPage(focusEnabled = false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue