mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-03 13:44:40 +00:00
Prevent crash
This commit is contained in:
parent
3e3a2b3885
commit
dae4a30c47
1 changed files with 4 additions and 1 deletions
|
@ -606,8 +606,8 @@ public class FragmentGmail extends FragmentBase {
|
|||
protected void onExecuted(Bundle args, Void data) {
|
||||
boolean updated = args.getBoolean("updated");
|
||||
if (updated) {
|
||||
finish();
|
||||
ToastEx.makeText(getContext(), R.string.title_setup_oauth_updated, Toast.LENGTH_LONG).show();
|
||||
finish();
|
||||
} else {
|
||||
FragmentDialogAccount fragment = new FragmentDialogAccount();
|
||||
fragment.setArguments(args);
|
||||
|
@ -620,6 +620,9 @@ public class FragmentGmail extends FragmentBase {
|
|||
protected void onException(Bundle args, Throwable ex) {
|
||||
Log.e(ex);
|
||||
|
||||
if (!getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
|
||||
return;
|
||||
|
||||
if (ex instanceof IllegalArgumentException)
|
||||
tvError.setText(ex.getMessage());
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue