add updater dialog focus
This commit is contained in:
+8
-3
@@ -95,13 +95,17 @@ fun UpdateDialog(
|
|||||||
)
|
)
|
||||||
|
|
||||||
is UpdateState.UpToDate -> {
|
is UpdateState.UpToDate -> {
|
||||||
UpdateFinishedContent(onSkip = { component.reset() })
|
UpdateFinishedContent(
|
||||||
|
onSkip = { component.reset() },
|
||||||
|
focusRequester = focusRequester
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
is UpdateState.Completed -> {
|
is UpdateState.Completed -> {
|
||||||
UpdateFinishedContent(
|
UpdateFinishedContent(
|
||||||
Res.string.updater_title_completed,
|
Res.string.updater_title_completed,
|
||||||
onSkip = { component.reset() }
|
onSkip = { component.reset() },
|
||||||
|
focusRequester = focusRequester
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -264,6 +268,7 @@ private fun UpdateReadyContent(
|
|||||||
private fun UpdateFinishedContent(
|
private fun UpdateFinishedContent(
|
||||||
text: StringResource = Res.string.updater_title_not_found,
|
text: StringResource = Res.string.updater_title_not_found,
|
||||||
onSkip: () -> Unit,
|
onSkip: () -> Unit,
|
||||||
|
focusRequester: FocusRequester,
|
||||||
modifier: Modifier = Modifier
|
modifier: Modifier = Modifier
|
||||||
) {
|
) {
|
||||||
Column(
|
Column(
|
||||||
@@ -272,7 +277,7 @@ private fun UpdateFinishedContent(
|
|||||||
verticalArrangement = Arrangement.spacedBy(16.dp)
|
verticalArrangement = Arrangement.spacedBy(16.dp)
|
||||||
) {
|
) {
|
||||||
Text(text = stringResource(text), style = MaterialTheme.typography.titleLarge)
|
Text(text = stringResource(text), style = MaterialTheme.typography.titleLarge)
|
||||||
Button(onClick = onSkip, modifier = Modifier.fillMaxWidth()) {
|
Button(onClick = onSkip, modifier = Modifier.focusRequester(focusRequester).fillMaxWidth()) {
|
||||||
Text(
|
Text(
|
||||||
stringResource(Res.string.updater_btn_close),
|
stringResource(Res.string.updater_btn_close),
|
||||||
style = MaterialTheme.typography.labelLarge
|
style = MaterialTheme.typography.labelLarge
|
||||||
|
|||||||
Reference in New Issue
Block a user