Skip to content

Commit

Permalink
Code formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
ankur2136 committed Oct 9, 2023
1 parent a5bf715 commit e8681d8
Showing 1 changed file with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ fun TogiCountryCodePicker(
TextFieldValue(
text = initialPhoneNumber.orEmpty(),
selection = TextRange(initialPhoneNumber?.length ?: 0),
)
),
)
}
val keyboardController = LocalSoftwareKeyboardController.current
Expand Down Expand Up @@ -153,8 +153,10 @@ fun TogiCountryCodePicker(
OutlinedTextField(
value = phoneNumber,
onValueChange = { enteredPhoneNumber ->
val prefilteredPhoneNumber = phoneNumberTransformation.preFilter(enteredPhoneNumber.text)
phoneNumber = TextFieldValue(prefilteredPhoneNumber, TextRange(prefilteredPhoneNumber.length))
val prefilteredPhoneNumber =
phoneNumberTransformation.preFilter(enteredPhoneNumber.text)
phoneNumber =
TextFieldValue(prefilteredPhoneNumber, TextRange(prefilteredPhoneNumber.length))
isNumberValid = validatePhoneNumber(
fullPhoneNumber = country.countryPhoneCode + phoneNumber.text,
)
Expand All @@ -165,9 +167,13 @@ fun TogiCountryCodePicker(
.focusable()
.autofill(
autofillTypes = listOf(AutofillType.PhoneNumberNational),
onFill = {filledPhoneNumber ->
val prefilteredPhoneNumber = phoneNumberTransformation.preFilter(filledPhoneNumber)
phoneNumber = TextFieldValue(prefilteredPhoneNumber, TextRange(prefilteredPhoneNumber.length))
onFill = { filledPhoneNumber ->
val prefilteredPhoneNumber =
phoneNumberTransformation.preFilter(filledPhoneNumber)
phoneNumber = TextFieldValue(
prefilteredPhoneNumber,
TextRange(prefilteredPhoneNumber.length),
)
isNumberValid = validatePhoneNumber(
fullPhoneNumber = country.countryPhoneCode + phoneNumber.text,
)
Expand Down

0 comments on commit e8681d8

Please sign in to comment.