From 1a523d04efb8b55a87a9fbe0ac011dea42762bdc Mon Sep 17 00:00:00 2001 From: Abdelilah El Aissaoui Date: Wed, 23 Aug 2023 15:48:20 +0200 Subject: [PATCH] Fixed crash when opening quick actions dialog --- .../jetpackduba/gitnuro/ui/dialogs/QuickActionsDialog.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/com/jetpackduba/gitnuro/ui/dialogs/QuickActionsDialog.kt b/src/main/kotlin/com/jetpackduba/gitnuro/ui/dialogs/QuickActionsDialog.kt index 604503e..6603f93 100644 --- a/src/main/kotlin/com/jetpackduba/gitnuro/ui/dialogs/QuickActionsDialog.kt +++ b/src/main/kotlin/com/jetpackduba/gitnuro/ui/dialogs/QuickActionsDialog.kt @@ -50,10 +50,6 @@ fun QuickActionsDialog( mutableStateOf(0) } - LaunchedEffect(Unit) { - textFieldFocusRequester.requestFocus() - } - MaterialDialog( onCloseRequested = onClose, background = MaterialTheme.colors.surface, @@ -118,6 +114,10 @@ fun QuickActionsDialog( } } } + + LaunchedEffect(Unit) { + textFieldFocusRequester.requestFocus() + } } } }