diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/changenumber/ChangeNumberEnterPhoneNumberFragment.kt b/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/changenumber/ChangeNumberEnterPhoneNumberFragment.kt
index 1d253ba86d9..fd13c8fa588 100644
--- a/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/changenumber/ChangeNumberEnterPhoneNumberFragment.kt
+++ b/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/changenumber/ChangeNumberEnterPhoneNumberFragment.kt
@@ -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 -> {
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index eaa51c5366f..585af408614 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -5078,6 +5078,7 @@
You must specify your old phone number
You must specify your new number\'s country code
You must specify your new phone number
+ Your new phone number can not be same as your old phone number
Change Number