Refactor app settings.

This commit is contained in:
Alex Hart
2021-05-12 13:02:44 -03:00
committed by Greyson Parrelli
parent a94d77d81e
commit f2d5ea0391
179 changed files with 5244 additions and 3894 deletions

View File

@@ -31,7 +31,6 @@ import com.google.android.material.snackbar.Snackbar;
import com.google.i18n.phonenumbers.AsYouTypeFormatter;
import com.google.i18n.phonenumbers.PhoneNumberUtil;
import org.thoughtcrime.securesms.ApplicationPreferencesActivity;
import org.thoughtcrime.securesms.R;
import org.thoughtcrime.securesms.components.LabeledEditText;
import org.thoughtcrime.securesms.util.SpanUtil;
@@ -42,13 +41,13 @@ import org.whispersystems.libsignal.util.guava.Optional;
public class DeleteAccountFragment extends Fragment {
private ArrayAdapter<String> countrySpinnerAdapter;
private TextView bullets;
private LabeledEditText countryCode;
private LabeledEditText number;
private AsYouTypeFormatter countryFormatter;
private DeleteAccountViewModel viewModel;
private DialogInterface deletionProgressDialog;
private ArrayAdapter<String> countrySpinnerAdapter;
private TextView bullets;
private LabeledEditText countryCode;
private LabeledEditText number;
private AsYouTypeFormatter countryFormatter;
private DeleteAccountViewModel viewModel;
private DialogInterface deletionProgressDialog;
@Override
public @Nullable View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
@@ -57,8 +56,8 @@ public class DeleteAccountFragment extends Fragment {
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
Spinner countrySpinner = view.findViewById(R.id.delete_account_fragment_country_spinner);
View confirm = view.findViewById(R.id.delete_account_fragment_delete);
Spinner countrySpinner = view.findViewById(R.id.delete_account_fragment_country_spinner);
View confirm = view.findViewById(R.id.delete_account_fragment_delete);
bullets = view.findViewById(R.id.delete_account_fragment_bullets);
countryCode = view.findViewById(R.id.delete_account_fragment_country_code);
@@ -80,12 +79,6 @@ public class DeleteAccountFragment extends Fragment {
initializeSpinner(countrySpinner);
}
@Override
public void onResume() {
super.onResume();
((ApplicationPreferencesActivity) getActivity()).getSupportActionBar().setTitle(R.string.preferences__delete_account);
}
private void updateBullets(@NonNull Optional<String> formattedBalance) {
bullets.setText(buildBulletsText(formattedBalance));
}