Skip to content

Commit

Permalink
Merge branch 'ime-does-not-work-correctly-in-creating-custom-listings…
Browse files Browse the repository at this point in the history
…-droid-1403'
  • Loading branch information
Rawa committed Oct 7, 2024
2 parents a0839b7 + 3f5fc03 commit b57b3fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b57b3fa

Please sign in to comment.