diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/CreateCustomListDialog.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/CreateCustomListDialog.kt index a7656573b149..fc9109cf4d10 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/CreateCustomListDialog.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/CreateCustomListDialog.kt @@ -2,10 +2,9 @@ package net.mullvad.mullvadvpn.compose.dialog import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect -import androidx.compose.runtime.derivedStateOf import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember +import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.ui.Modifier import androidx.compose.ui.platform.testTag import androidx.compose.ui.res.stringResource @@ -97,8 +96,8 @@ fun CreateCustomListDialog( onInputChanged: () -> Unit = {}, onDismiss: () -> Unit = {}, ) { - val name = remember { mutableStateOf("") } - val isValidName by remember { derivedStateOf { name.value.isNotBlank() } } + val name = rememberSaveable { mutableStateOf("") } + val isValidName = name.value.isNotBlank() InputDialog( title = stringResource(id = R.string.create_new_list), diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/textfield/CustomListNameTextField.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/textfield/CustomListNameTextField.kt index d8439a5c0dcc..ddbd1fd8d033 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/textfield/CustomListNameTextField.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/textfield/CustomListNameTextField.kt @@ -33,9 +33,7 @@ fun CustomListNameTextField( onSubmit(it) } }, - // This can not be set to KeyboardType.Text because it will show the - // suggestions, this will cause an infinite loop on Android TV with Gboard - keyboardType = KeyboardType.Password, + keyboardType = KeyboardType.Text, placeholderText = null, isValidValue = error == null, isDigitsOnlyAllowed = false,