@@ -32,15 +32,13 @@ - (void)dismissAllModals:(NSString *)commandId options:(NSDictionary *)options r
3232 });
3333}
3434
35-
3635- (void )dismissAllOverlays : (NSString *)commandId resolve : (RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock)reject {
3736 RCTExecuteOnMainQueue (^{
3837 [[RNNTurboCommandsHandler sharedInstance ] dismissAllOverlays: commandId];
3938 resolve (nil );
4039 });
4140}
4241
43-
4442- (void )dismissModal : (NSString *)commandId componentId : (NSString *)componentId options : (NSDictionary *)options resolve : (RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock)reject {
4543 RCTExecuteOnMainQueue (^{
4644 [[RNNTurboCommandsHandler sharedInstance ] dismissModal: componentId
@@ -53,7 +51,6 @@ - (void)dismissModal:(NSString *)commandId componentId:(NSString *)componentId o
5351 });
5452}
5553
56-
5754- (void )dismissOverlay : (NSString *)commandId componentId : (NSString *)componentId resolve : (RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock)reject {
5855 RCTExecuteOnMainQueue (^{
5956 [[RNNTurboCommandsHandler sharedInstance ] dismissOverlay: componentId
@@ -65,24 +62,12 @@ - (void)dismissOverlay:(NSString *)commandId componentId:(NSString *)componentId
6562 });
6663}
6764
68-
6965- (void )getLaunchArgs : (NSString *)commandId resolve : (RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock)reject {
7066 NSArray *args = [[NSProcessInfo processInfo ] arguments ];
7167 resolve (args);
7268}
7369
7470
75- - (void )mergeOptions : (NSString *)componentId options : (NSDictionary *)options resolve : (RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock)reject {
76- RCTExecuteOnMainQueue (^{
77- [[RNNTurboCommandsHandler sharedInstance ] mergeOptions: componentId
78- options: options
79- completion: ^{
80- resolve (componentId);
81- }];
82- });
83- }
84-
85-
8671- (void )pop : (NSString *)commandId componentId : (NSString *)componentId options : (NSDictionary *)options resolve : (RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock)reject {
8772 RCTExecuteOnMainQueue (^{
8873 [[RNNTurboCommandsHandler sharedInstance ] pop: componentId
@@ -95,7 +80,6 @@ - (void)pop:(NSString *)commandId componentId:(NSString *)componentId options:(N
9580 });
9681}
9782
98-
9983- (void )popTo : (NSString *)commandId componentId : (NSString *)componentId options : (NSDictionary *)options resolve : (RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock)reject {
10084 RCTExecuteOnMainQueue (^{
10185 [[RNNTurboCommandsHandler sharedInstance ] popTo: componentId
@@ -108,7 +92,6 @@ - (void)popTo:(NSString *)commandId componentId:(NSString *)componentId options:
10892 });
10993}
11094
111-
11295- (void )popToRoot : (NSString *)commandId componentId : (NSString *)componentId options : (NSDictionary *)options resolve : (RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock)reject {
11396 RCTExecuteOnMainQueue (^{
11497 [[RNNTurboCommandsHandler sharedInstance ] popToRoot: componentId
@@ -121,7 +104,6 @@ - (void)popToRoot:(NSString *)commandId componentId:(NSString *)componentId opti
121104 });
122105}
123106
124-
125107- (void )push : (NSString *)commandId componentId : (NSString *)componentId layout : (NSDictionary *)layout resolve : (RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock)reject {
126108 RCTExecuteOnMainQueue (^{
127109 [[RNNTurboCommandsHandler sharedInstance ] push: componentId
@@ -134,16 +116,6 @@ - (void)push:(NSString *)commandId componentId:(NSString *)componentId layout:(N
134116 });
135117}
136118
137-
138- - (void )setDefaultOptions : (NSDictionary *)options resolve : (RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock)reject {
139- RCTExecuteOnMainQueue (^{
140- [[RNNTurboCommandsHandler sharedInstance ] setDefaultOptions: options completion: ^() {
141- resolve (nil );
142- }];
143- });
144- }
145-
146-
147119- (void )setRoot : (NSString *)commandId layout : (NSDictionary *)layout resolve : (RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock)reject {
148120 RCTExecuteOnMainQueue (^{
149121 [[RNNTurboCommandsHandler sharedInstance ] setRoot: layout
@@ -154,7 +126,6 @@ - (void)setRoot:(NSString *)commandId layout:(NSDictionary *)layout resolve:(RCT
154126 });
155127}
156128
157-
158129- (void )setStackRoot : (NSString *)commandId componentId : (NSString *)componentId layout : (NSDictionary *)layout resolve : (RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock)reject {
159130 RCTExecuteOnMainQueue (^{
160131 [[RNNTurboCommandsHandler sharedInstance ] setStackRoot: componentId
@@ -167,7 +138,6 @@ - (void)setStackRoot:(NSString *)commandId componentId:(NSString *)componentId l
167138 });
168139}
169140
170-
171141- (void )showModal : (NSString *)commandId layout : (NSDictionary *)layout resolve : (RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock)reject {
172142 RCTExecuteOnMainQueue (^{
173143 [[RNNTurboCommandsHandler sharedInstance ] showModal: layout
@@ -178,7 +148,6 @@ - (void)showModal:(NSString *)commandId layout:(NSDictionary *)layout resolve:(R
178148 });
179149}
180150
181-
182151- (void )showOverlay : (NSString *)commandId layout : (NSDictionary *)layout resolve : (RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock)reject {
183152 RCTExecuteOnMainQueue (^{
184153 [[RNNTurboCommandsHandler sharedInstance ] showOverlay: layout
@@ -189,6 +158,20 @@ - (void)showOverlay:(NSString *)commandId layout:(NSDictionary *)layout resolve:
189158 });
190159}
191160
161+ - (void )mergeOptions : (NSString *)componentId options : (NSDictionary *)options {
162+ RCTExecuteOnMainQueue (^{
163+ [[RNNTurboCommandsHandler sharedInstance ] mergeOptions: componentId
164+ options: options
165+ completion: ^{}];
166+ });
167+ }
168+
169+
170+ - (void )setDefaultOptions : (NSDictionary *)options {
171+ RCTExecuteOnMainQueue (^{
172+ [[RNNTurboCommandsHandler sharedInstance ] setDefaultOptions: options completion: ^() {}];
173+ });
174+ }
192175
193176@end
194177#endif
0 commit comments