Skip to content

Commit a92d058

Browse files
authored
Make country spinner survive rotation (#1520)
1 parent e3d32ac commit a92d058

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

auth/src/main/java/com/firebase/ui/auth/ui/phone/CheckPhoneNumberFragment.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ public void onDonePressed() {
9898
mSubmitButton.setOnClickListener(this);
9999

100100
setupPrivacyDisclosures(view.<TextView>findViewById(R.id.email_footer_tos_and_pp_text));
101+
setupCountrySpinner();
101102
}
102103

103104
@Override
@@ -115,12 +116,12 @@ protected void onFailure(@NonNull Exception e) {
115116
}
116117
});
117118

118-
if (savedInstanceState != null || mCalled) { return; }
119+
if (savedInstanceState != null || mCalled) {
120+
return;
121+
}
119122
// Fragment back stacks are the stuff of nightmares (what's new?): the fragment isn't
120123
// destroyed so its state isn't saved and we have to rely on an instance field. Sigh.
121124
mCalled = true;
122-
123-
setupCountrySpinner();
124125
}
125126

126127
@Override

0 commit comments

Comments
 (0)