From ab48aa57662f75e46145ee762b8d1b5dd5249259 Mon Sep 17 00:00:00 2001 From: Nicholas Tinsley Date: Fri, 24 Feb 2023 11:05:45 -0500 Subject: [PATCH] Do not force +1 country code when restoring registration state. --- .../registration/fragments/EnterPhoneNumberFragment.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/registration/fragments/EnterPhoneNumberFragment.java b/app/src/main/java/org/thoughtcrime/securesms/registration/fragments/EnterPhoneNumberFragment.java index 04739b985..c3b04eb84 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/registration/fragments/EnterPhoneNumberFragment.java +++ b/app/src/main/java/org/thoughtcrime/securesms/registration/fragments/EnterPhoneNumberFragment.java @@ -129,8 +129,13 @@ public final class EnterPhoneNumberFragment extends LoggingFragment implements R if (supportActionBar != null) { supportActionBar.setTitle(null); } - controller.prepopulateCountryCode(); - controller.setNumberAndCountryCode(viewModel.getNumber()); + + final NumberViewState viewModelNumber = viewModel.getNumber(); + if (viewModelNumber.getCountryCode() == 0) { + controller.prepopulateCountryCode(); + } + controller.setNumberAndCountryCode(viewModelNumber); + showKeyboard(number.getEditText()); if (viewModel.hasUserSkippedReRegisterFlow() && viewModel.shouldAutoShowSmsConfirmDialog()) {