yogevbd 6 years ago
parent
commit
f7b1f163d2
3 changed files with 7 additions and 2 deletions
  1. 1
    1
      lib/ios/RNNCommandsHandler.m
  2. 2
    0
      lib/ios/RNNOverlayManager.h
  3. 4
    1
      lib/ios/RNNOverlayManager.m

+ 1
- 1
lib/ios/RNNCommandsHandler.m View File

@@ -20,7 +20,7 @@
20 20
 	_controllerFactory = controllerFactory;
21 21
 	_navigationStackManager = [[RNNNavigationStackManager alloc] initWithStore:_store];
22 22
 	_modalManager = [[RNNModalManager alloc] initWithStore:_store];
23
-	_overlayManager = [[RNNOverlayManager alloc] init];
23
+	_overlayManager = [[RNNOverlayManager alloc] initWithStore:_store];
24 24
 	return self;
25 25
 }
26 26
 

+ 2
- 0
lib/ios/RNNOverlayManager.h View File

@@ -4,6 +4,8 @@
4 4
 
5 5
 @interface RNNOverlayManager : NSObject
6 6
 
7
+- (instancetype)initWithStore:(RNNStore*)store;
8
+
7 9
 - (void)showOverlay:(UIViewController*)viewController completion:(RNNTransitionCompletionBlock)completion;
8 10
 - (void)dismissOverlay:(NSString*)componentId completion:(RNNTransitionCompletionBlock)completion;
9 11
 

+ 4
- 1
lib/ios/RNNOverlayManager.m View File

@@ -2,11 +2,13 @@
2 2
 
3 3
 @implementation RNNOverlayManager {
4 4
 	NSMutableDictionary* _overlayDict;
5
+	RNNStore* _store;
5 6
 }
6 7
 
7
-- (instancetype)init {
8
+- (instancetype)initWithStore:(RNNStore *)store {
8 9
 	self = [super init];
9 10
 	_overlayDict = [[NSMutableDictionary alloc] init];
11
+	_store = store;
10 12
 	return self;
11 13
 }
12 14
 
@@ -33,6 +35,7 @@
33 35
 - (void)removeCachedOverlay:(RNNRootViewController*)viewController {
34 36
 	[viewController.view removeFromSuperview];
35 37
 	[_overlayDict removeObjectForKey:viewController.componentId];
38
+	[_store removeComponent:viewController.componentId];
36 39
 }
37 40
 
38 41
 @end