Show dialog on UI thread to avoid crash
This commit is contained in:
parent
86764c4e42
commit
641dea6d84
|
@ -284,12 +284,15 @@ public class DialogAndroid extends ReactContextBaseJavaModule {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
mActivity.runOnUiThread(new Runnable() {
|
||||||
|
public void run() {
|
||||||
if(mDialog != null)
|
if(mDialog != null)
|
||||||
mDialog.dismiss();
|
mDialog.dismiss();
|
||||||
mDialog = mBuilder.build();
|
mDialog = mBuilder.build();
|
||||||
mDialog.show();
|
mDialog.show();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@ReactMethod
|
@ReactMethod
|
||||||
public void dismiss() {
|
public void dismiss() {
|
||||||
|
|
Loading…
Reference in New Issue