Skip to content

Commit

Permalink
Fixes #13864 - Avoid Changing to same Phone Number
Browse files Browse the repository at this point in the history
  • Loading branch information
Sagar0-0 committed Jan 6, 2025
1 parent ba79a3e commit cb90e56
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ class ChangeNumberEnterPhoneNumberFragment : LoggingFragment(R.layout.fragment_c
return
}

if (TextUtils.equals(binding.changeNumberEnterPhoneNumberOldNumberNumber.text,binding.changeNumberEnterPhoneNumberNewNumberNumber.text)) {
Toast.makeText(context, getString(R.string.ChangeNumberEnterPhoneNumberFragment__your_new_phone_number_can_not_be_same_as_your_old_phone_number), Toast.LENGTH_LONG).show()
return
}

when (viewModel.canContinue()) {
ChangeNumberViewModel.ContinueStatus.CAN_CONTINUE -> findNavController().safeNavigate(ChangeNumberEnterPhoneNumberFragmentDirections.actionEnterPhoneNumberChangeFragmentToChangePhoneNumberConfirmFragment())
ChangeNumberViewModel.ContinueStatus.INVALID_NUMBER -> {
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5078,6 +5078,7 @@
<string name="ChangeNumberEnterPhoneNumberFragment__you_must_specify_your_old_phone_number">You must specify your old phone number</string>
<string name="ChangeNumberEnterPhoneNumberFragment__you_must_specify_your_new_number_country_code">You must specify your new number\'s country code</string>
<string name="ChangeNumberEnterPhoneNumberFragment__you_must_specify_your_new_phone_number">You must specify your new phone number</string>
<string name="ChangeNumberEnterPhoneNumberFragment__your_new_phone_number_can_not_be_same_as_your_old_phone_number">Your new phone number can not be same as your old phone number</string>

<!-- ChangeNumberVerifyFragment -->
<string name="ChangeNumberVerifyFragment__change_number">Change Number</string>
Expand Down

0 comments on commit cb90e56

Please sign in to comment.