Skip to content

Commit

Permalink
fixes bug in the phone number field on the registration screen
Browse files Browse the repository at this point in the history
changes the API url
  • Loading branch information
LucasOliveiraSimao committed Sep 17, 2024
1 parent 3be9bf2 commit 533b136
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 533b136

Please sign in to comment.