mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-06 11:59:58 +02:00
fix: Avoid NPE because of progressDialog (#3715)
This commit is contained in:
parent
10c4a105bb
commit
05d2d0964f
1 changed files with 10 additions and 4 deletions
|
@ -88,7 +88,7 @@ public class InstantOnboardingActivity extends BaseActionBarActivity implements
|
|||
|
||||
private AttachmentManager attachmentManager;
|
||||
private Bitmap avatarBmp;
|
||||
private ProgressDialog progressDialog;
|
||||
private @Nullable ProgressDialog progressDialog;
|
||||
private DcContext dcContext;
|
||||
|
||||
@Override
|
||||
|
@ -416,17 +416,23 @@ public class InstantOnboardingActivity extends BaseActionBarActivity implements
|
|||
|
||||
private void progressUpdate(int progress) {
|
||||
int percent = progress / 10;
|
||||
progressDialog.setMessage(getResources().getString(R.string.one_moment)+String.format(" %d%%", percent));
|
||||
if (progressDialog != null) {
|
||||
progressDialog.setMessage(getResources().getString(R.string.one_moment)+String.format(" %d%%", percent));
|
||||
}
|
||||
}
|
||||
|
||||
private void progressError(String data2) {
|
||||
progressDialog.dismiss();
|
||||
if (progressDialog != null) {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
WelcomeActivity.maybeShowConfigurationError(this, data2);
|
||||
}
|
||||
|
||||
private void progressSuccess() {
|
||||
DcHelper.getEventCenter(this).endCaptureNextError();
|
||||
progressDialog.dismiss();
|
||||
if (progressDialog != null) {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
|
||||
Intent intent = new Intent(getApplicationContext(), ConversationListActivity.class);
|
||||
intent.putExtra(ConversationListActivity.FROM_WELCOME, true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue