Setup accounts before setting up identities

Fixes #73
pull/91/head
M66B 6 years ago
parent 390074a2c3
commit c692777d66

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

@ -144,6 +144,7 @@ public class FragmentSetup extends FragmentEx {
pbAccount.setVisibility(View.GONE);
pbIdentity.setVisibility(View.GONE);
tvAccountDone.setText(R.string.title_setup_to_do);
btnIdentity.setEnabled(false);
tvIdentityDone.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
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);
btnIdentity.setEnabled(accounts != null && accounts.size() > 0);
}
});

Loading…
Cancel
Save