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
 	_controllerFactory = controllerFactory;
20
 	_controllerFactory = controllerFactory;
21
 	_navigationStackManager = [[RNNNavigationStackManager alloc] initWithStore:_store];
21
 	_navigationStackManager = [[RNNNavigationStackManager alloc] initWithStore:_store];
22
 	_modalManager = [[RNNModalManager alloc] initWithStore:_store];
22
 	_modalManager = [[RNNModalManager alloc] initWithStore:_store];
23
-	_overlayManager = [[RNNOverlayManager alloc] init];
23
+	_overlayManager = [[RNNOverlayManager alloc] initWithStore:_store];
24
 	return self;
24
 	return self;
25
 }
25
 }
26
 
26
 

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

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

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

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