Add identity after save account

This commit is contained in:
M66B
2019-05-07 21:40:23 +02:00
parent 7b277737f5
commit cc268a655a
4 changed files with 33 additions and 6 deletions

View File

@@ -121,6 +121,7 @@ public class FragmentIdentity extends FragmentBase {
private Group grpAdvanced;
private long id = -1;
private long account = -1;
private boolean saving = false;
private int auth_type = Helper.AUTH_TYPE_PASSWORD;
private int color = Color.TRANSPARENT;
@@ -133,6 +134,7 @@ public class FragmentIdentity extends FragmentBase {
// Get arguments
Bundle args = getArguments();
id = args.getLong("id", -1);
account = args.getLong("account", -1);
}
@Override
@@ -879,7 +881,7 @@ public class FragmentIdentity extends FragmentBase {
spAccount.setSelection(0);
for (int pos = 0; pos < accounts.size(); pos++) {
EntityAccount account = accounts.get(pos);
if (account.id.equals((identity == null ? -1 : identity.account))) {
if (account.id.equals(identity == null ? FragmentIdentity.this.account : identity.account)) {
spAccount.setTag(pos);
spAccount.setSelection(pos);
// OAuth token could be updated