- Put the loading dialog code of the backup restore before the import request is added
- Fixing an error triggered when the import seed form is filled too fast. The bitshare name request of the account gets a null listener and makes the app to crash
This commit is contained in:
parent
d43c75a501
commit
de2391c6f8
2 changed files with 7 additions and 5 deletions
|
@ -196,15 +196,15 @@ public class ImportAccountOptionsFragment extends DialogFragment {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
FileServiceRequests.getInstance().addRequest(importBackupRequest);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Show loading dialog
|
* Show loading dialog
|
||||||
* */
|
* */
|
||||||
crystalDialog = new CrystalDialog((Activity) getContext());
|
crystalDialog = new CrystalDialog((Activity) getContext());
|
||||||
crystalDialog.setText(getContext().getString(R.string.Creating_backup_from_file));
|
crystalDialog.setText(getContext().getString(R.string.Creating_backup_from_file));
|
||||||
crystalDialog.progress();
|
crystalDialog.progress();
|
||||||
crystalDialog.show();
|
crystalDialog.show();
|
||||||
|
|
||||||
|
FileServiceRequests.getInstance().addRequest(importBackupRequest);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.setNegativeButton("Cancel",
|
.setNegativeButton("Cancel",
|
||||||
|
|
|
@ -37,7 +37,9 @@ public abstract class CryptoNetInfoRequest {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void _fireOnCarryOutEvent(){
|
protected void _fireOnCarryOutEvent(){
|
||||||
listener.onCarryOut();
|
if (listener != null) {
|
||||||
|
listener.onCarryOut();
|
||||||
|
}
|
||||||
CryptoNetInfoRequests.getInstance().removeRequest(this);
|
CryptoNetInfoRequests.getInstance().removeRequest(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue