Pārlūkot izejas kodu

Revert "Resolves componentId on showModal"

This reverts commit 2d879ccd0c.
yogevbd 6 gadus atpakaļ
vecāks
revīzija
e1ee3d5f99

+ 2
- 2
lib/ios/RNNBridgeModule.m Parādīt failu

@@ -68,8 +68,8 @@ RCT_EXPORT_METHOD(popToRoot:(NSString*)commandId componentId:(NSString*)componen
68 68
 }
69 69
 
70 70
 RCT_EXPORT_METHOD(showModal:(NSString*)commandId layout:(NSDictionary*)layout resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) {
71
-	[_commandsHandler showModal:layout completion:^(NSString *componentId) {
72
-		resolve(componentId);
71
+	[_commandsHandler showModal:layout completion:^{
72
+		resolve(nil);
73 73
 	}];
74 74
 }
75 75
 

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

@@ -24,7 +24,7 @@
24 24
 
25 25
 -(void)setStackRoot:(NSString*)componentId layout:(NSDictionary*)layout completion:(RNNTransitionCompletionBlock)completion rejection:(RCTPromiseRejectBlock)rejection;
26 26
 
27
--(void)showModal:(NSDictionary*)layout completion:(RNNTransitionWithComponentIdCompletionBlock)completion;
27
+-(void)showModal:(NSDictionary*)layout completion:(RNNTransitionCompletionBlock)completion;
28 28
 
29 29
 -(void)dismissModal:(NSString*)componentId completion:(RNNTransitionCompletionBlock)completion;
30 30
 

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

@@ -205,13 +205,13 @@ static NSString* const setDefaultOptions	= @"setDefaultOptions";
205 205
 	[CATransaction commit];
206 206
 }
207 207
 
208
-- (void)showModal:(NSDictionary*)layout completion:(RNNTransitionWithComponentIdCompletionBlock)completion {
208
+- (void)showModal:(NSDictionary*)layout completion:(RNNTransitionCompletionBlock)completion {
209 209
 	[self assertReady];
210 210
 
211 211
 	UIViewController<RNNRootViewProtocol> *newVc = [_controllerFactory createLayoutAndSaveToStore:layout];
212
-	[_modalManager showModal:newVc animated:newVc.getLeafViewController.options.animations.showModal.enable completion:^(NSString *componentId) {
212
+	[_modalManager showModal:newVc animated:newVc.getLeafViewController.options.animations.showModal.enable completion:^{
213 213
 		[_eventEmitter sendOnNavigationCommandCompletion:showModal params:@{@"layout": layout}];
214
-		completion(componentId);
214
+		completion();
215 215
 	}];
216 216
 }
217 217
 

+ 1
- 1
lib/ios/RNNModalManager.h Parādīt failu

@@ -7,7 +7,7 @@
7 7
 @property (nonatomic, strong) UIViewController<RNNRootViewProtocol>* toVC;
8 8
 
9 9
 - (instancetype)initWithStore:(RNNStore*)store;
10
-- (void)showModal:(UIViewController*)viewController animated:(BOOL)animated completion:(RNNTransitionWithComponentIdCompletionBlock)completion;
10
+- (void)showModal:(UIViewController*)viewController animated:(BOOL)animated completion:(RNNTransitionCompletionBlock)completion;
11 11
 - (void)dismissModal:(NSString *)componentId completion:(RNNTransitionCompletionBlock)completion;
12 12
 - (void)dismissAllModals;
13 13
 

+ 3
- 3
lib/ios/RNNModalManager.m Parādīt failu

@@ -3,7 +3,7 @@
3 3
 
4 4
 @implementation RNNModalManager {
5 5
 	RNNStore *_store;
6
-	RNNTransitionWithComponentIdCompletionBlock _completionBlock;
6
+	RNNTransitionCompletionBlock _completionBlock;
7 7
 }
8 8
 
9 9
 
@@ -27,14 +27,14 @@
27 27
 	
28 28
 	[topVC presentViewController:self.toVC animated:animated completion:^{
29 29
 		if (_completionBlock) {
30
-			_completionBlock(self.toVC.getLeafViewController.componentId);
30
+			_completionBlock();
31 31
 			_completionBlock = nil;
32 32
 		}
33 33
 		self.toVC = nil;
34 34
 	}];
35 35
 }
36 36
 
37
--(void)showModal:(UIViewController *)viewController animated:(BOOL)animated completion:(RNNTransitionWithComponentIdCompletionBlock)completion {
37
+-(void)showModal:(UIViewController *)viewController animated:(BOOL)animated completion:(RNNTransitionCompletionBlock)completion {
38 38
 	self.toVC = (UIViewController<RNNRootViewProtocol>*)viewController;
39 39
 	RNNNavigationOptions* options = self.toVC.getLeafViewController.options;
40 40
 

+ 0
- 1
lib/ios/RNNStore.h Parādīt failu

@@ -5,7 +5,6 @@
5 5
 #import "ReactNativeNavigation.h"
6 6
 
7 7
 typedef void (^RNNTransitionCompletionBlock)(void);
8
-typedef void (^RNNTransitionWithComponentIdCompletionBlock)(NSString *componentId);
9 8
 typedef void (^RNNTransitionRejectionBlock)(NSString *code, NSString *message, NSError *error);
10 9
 
11 10
 @interface RNNStore : NSObject