|
@@ -15,6 +15,7 @@ const NSInteger kLightBoxTag = 0x101010;
|
15
|
15
|
@property (nonatomic, strong) UIView *overlayColorView;
|
16
|
16
|
@property (nonatomic, strong) NSDictionary *params;
|
17
|
17
|
@property (nonatomic) BOOL yellowBoxRemoved;
|
|
18
|
+@property (nonatomic) BOOL isDismissing;
|
18
|
19
|
@end
|
19
|
20
|
|
20
|
21
|
@implementation RCCLightBoxView
|
|
@@ -175,6 +176,8 @@ const NSInteger kLightBoxTag = 0x101010;
|
175
|
176
|
|
176
|
177
|
-(void)dismissAnimated
|
177
|
178
|
{
|
|
179
|
+ self.isDismissing = YES;
|
|
180
|
+
|
178
|
181
|
BOOL hasOverlayViews = (self.visualEffectView != nil || self.overlayColorView != nil);
|
179
|
182
|
|
180
|
183
|
[UIView animateWithDuration:0.2 animations:^()
|
|
@@ -218,7 +221,8 @@ const NSInteger kLightBoxTag = 0x101010;
|
218
|
221
|
+(void)showWithParams:(NSDictionary*)params
|
219
|
222
|
{
|
220
|
223
|
UIViewController *viewController = RCTPresentedViewController();
|
221
|
|
- if ([viewController.view viewWithTag:kLightBoxTag] != nil)
|
|
224
|
+ RCCLightBoxView *previousLightBox = [viewController.view viewWithTag:kLightBoxTag];
|
|
225
|
+ if (previousLightBox != nil && !previousLightBox.isDismissing)
|
222
|
226
|
{
|
223
|
227
|
return;
|
224
|
228
|
}
|