mirror of https://github.com/readrops/Readrops.git
Set its id to the new account instance
This commit is contained in:
parent
572f1f7c45
commit
60797cf76c
|
@ -81,9 +81,11 @@ public class AddAccountActivity extends AppCompatActivity {
|
|||
startActivity(intent);
|
||||
|
||||
finish();
|
||||
} else
|
||||
} else {
|
||||
binding.addAccountValidate.setEnabled(true);
|
||||
Toast.makeText(AddAccountActivity.this, "Impossible to login",
|
||||
Toast.LENGTH_SHORT).show();
|
||||
Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -55,9 +55,8 @@ public class NextNewsRepository extends ARepository {
|
|||
account.setDisplayedName(user.getDisplayName());
|
||||
account.setCurrentAccount(true);
|
||||
|
||||
database.accountDao().insert(account);
|
||||
account.setId((int) database.accountDao().insert(account));
|
||||
emitter.onSuccess(true);
|
||||
|
||||
} else
|
||||
emitter.onSuccess(false);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue