Skip to content

Commit

Permalink
Merge pull request #71 from PetJournal/fix-bug-phone-number-formatting
Browse files Browse the repository at this point in the history
fixes bug in the phone number field on the registration screen and changes the API url
  • Loading branch information
N0stalgiaUltra authored Sep 19, 2024
2 parents f64a106 + 533b136 commit bb8b351
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ val mainModule = module {
// Retrofit Service
single {
Retrofit.Builder()
.baseUrl("https://petjournal-api-z9gs.onrender.com/")
.baseUrl("https://petjournal-api-pm3z.onrender.com/")
.addConverterFactory(MoshiConverterFactory.create(get()))
.addCallAdapterFactory(NetworkResultCallAdapterFactory.create())
.build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,13 @@ fun Screen(navController: NavController, viewModel: RegisterViewModel) {
.fillMaxWidth()
.testTag("input_phone"),
onEvent = { it: String ->
viewModel.onEvent(
RegisterFormEvent.PhoneChanged(
it
if (it.length <= 11) {
viewModel.onEvent(
RegisterFormEvent.PhoneChanged(
it
)
)
)
}
},
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Number),
visualTransformation = { mobileNumberFilter(it) }
Expand Down

0 comments on commit bb8b351

Please sign in to comment.