mirror of
https://github.com/zhigang1992/react-native-progress-display.git
synced 2026-03-30 17:33:49 +08:00
Bug fix with KProgressHUD not resetting the custom view in certain cases.
This commit is contained in:
@@ -135,7 +135,14 @@ public class RNProgressHUDModule extends ReactContextBaseJavaModule {
|
||||
|
||||
private KProgressHUD showProgressHUD(Integer maskTypeInteger, KProgressHUDStyle style, String status) {
|
||||
Context context = this.reactContext.getCurrentActivity();
|
||||
if (context != null && this.progressHUD == null) {
|
||||
if (this.progressHUD == null) {
|
||||
this.progressHUD = KProgressHUD.create(context);
|
||||
if (this.progressHUD.isShowing()) {
|
||||
this.progressHUD.dismiss();
|
||||
}
|
||||
this.progressHUD = null;
|
||||
}
|
||||
if (context != null) {
|
||||
KProgressHUDMaskType maskType = getMaskTypeForInteger(maskTypeInteger);
|
||||
this.progressHUD = KProgressHUD.create(context)
|
||||
.setCancellable(getIsCancellableForMaskType(maskType))
|
||||
|
||||
Reference in New Issue
Block a user