Browse Source

Setup accounts before setting up identities

Fixes #73
main
M66B 6 years ago
parent
commit
c692777d66
2 changed files with 3 additions and 1 deletions
  1. +1
    -1
      app/src/main/java/eu/faircode/email/ActivitySetup.java
  2. +2
    -0
      app/src/main/java/eu/faircode/email/FragmentSetup.java

+ 1
- 1
app/src/main/java/eu/faircode/email/ActivitySetup.java View File

@ -35,7 +35,7 @@ import androidx.lifecycle.Observer;
import androidx.localbroadcastmanager.content.LocalBroadcastManager; import androidx.localbroadcastmanager.content.LocalBroadcastManager;
public class ActivitySetup extends ActivityBase implements FragmentManager.OnBackStackChangedListener { public class ActivitySetup extends ActivityBase implements FragmentManager.OnBackStackChangedListener {
boolean hasAccount;
private boolean hasAccount;
static final int REQUEST_PERMISSION = 1; static final int REQUEST_PERMISSION = 1;
static final int REQUEST_CHOOSE_ACCOUNT = 2; static final int REQUEST_CHOOSE_ACCOUNT = 2;


+ 2
- 0
app/src/main/java/eu/faircode/email/FragmentSetup.java View File

@ -144,6 +144,7 @@ public class FragmentSetup extends FragmentEx {
pbAccount.setVisibility(View.GONE); pbAccount.setVisibility(View.GONE);
pbIdentity.setVisibility(View.GONE); pbIdentity.setVisibility(View.GONE);
tvAccountDone.setText(R.string.title_setup_to_do); tvAccountDone.setText(R.string.title_setup_to_do);
btnIdentity.setEnabled(false);
tvIdentityDone.setText(R.string.title_setup_to_do); tvIdentityDone.setText(R.string.title_setup_to_do);
tvPermissionsDone.setText(R.string.title_setup_to_do); tvPermissionsDone.setText(R.string.title_setup_to_do);
@ -198,6 +199,7 @@ public class FragmentSetup extends FragmentEx {
@Override @Override
public void onChanged(@Nullable List<EntityAccount> accounts) { public void onChanged(@Nullable List<EntityAccount> accounts) {
tvAccountDone.setText(accounts != null && accounts.size() > 0 ? R.string.title_setup_done : R.string.title_setup_to_do); tvAccountDone.setText(accounts != null && accounts.size() > 0 ? R.string.title_setup_done : R.string.title_setup_to_do);
btnIdentity.setEnabled(accounts != null && accounts.size() > 0);
} }
}); });


Loading…
Cancel
Save