yogevbd 6 gadus atpakaļ
vecāks
revīzija
f7b1f163d2

+ 1
- 1
lib/ios/RNNCommandsHandler.m Parādīt failu

@@ -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 Parādīt failu

@@ -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 Parādīt failu

@@ -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