Fixed branch dialog not showing as a material dialog

This commit is contained in:
Abdelilah El Aissaoui 2021-12-02 22:49:35 +01:00
parent 9f67f91a77
commit 5f4762691c

View File

@ -26,6 +26,7 @@ fun NewBranchDialog(
val branchFieldFocusRequester = remember { FocusRequester() }
val buttonFieldFocusRequester = remember { FocusRequester() }
MaterialDialog {
Column(
modifier = Modifier
.background(MaterialTheme.colors.background),
@ -39,7 +40,7 @@ fun NewBranchDialog(
}
.width(300.dp)
.onPreviewKeyEvent {
if(it.key == Key.Enter) {
if (it.key == Key.Enter) {
onAccept(branchField)
true
} else {
@ -81,6 +82,7 @@ fun NewBranchDialog(
}
}
}
}
LaunchedEffect(Unit) {
branchFieldFocusRequester.requestFocus()