Commit cd2b384 1 parent 63d5bcb commit cd2b384 Copy full SHA for cd2b384
File tree 6 files changed +11
-20
lines changed
6 files changed +11
-20
lines changed Original file line number Diff line number Diff line change 20
20
@class RCTEventDispatcher;
21
21
@class RCTPerformanceLogger;
22
22
23
- /* *
24
- * This notification triggers a reload of all bridges currently running.
25
- * Deprecated, use RCTBridge::requestReload instead.
26
- */
27
- RCT_EXTERN NSString *const RCTReloadNotification DEPRECATED_ATTRIBUTE;
28
-
29
23
/* *
30
24
* This notification fires when the bridge starts loading the JS bundle.
31
25
*/
@@ -203,7 +197,7 @@ RCT_EXTERN NSString *RCTBridgeModuleNameForClass(Class bridgeModuleClass);
203
197
/* *
204
198
* Inform the bridge, and anything subscribing to it, that it should reload.
205
199
*/
206
- - (void )requestReload ;
200
+ - (void )requestReload __deprecated_msg( " Call reload instead " ) ;
207
201
208
202
/* *
209
203
* Says whether bridge has started recieving calls from javascript.
Original file line number Diff line number Diff line change 21
21
#import " RCTProfile.h"
22
22
#import " RCTUtils.h"
23
23
24
- NSString *const RCTReloadNotification = @" RCTReloadNotification" ;
25
24
NSString *const RCTJavaScriptWillStartLoadingNotification = @" RCTJavaScriptWillStartLoadingNotification" ;
26
25
NSString *const RCTJavaScriptDidLoadNotification = @" RCTJavaScriptDidLoadNotification" ;
27
26
NSString *const RCTJavaScriptDidFailToLoadNotification = @" RCTJavaScriptDidFailToLoadNotification" ;
@@ -200,7 +199,6 @@ - (void)dealloc
200
199
* This runs only on the main thread, but crashes the subclass
201
200
* RCTAssertMainQueue();
202
201
*/
203
- [[NSNotificationCenter defaultCenter ] removeObserver: self ];
204
202
[self invalidate ];
205
203
}
206
204
@@ -216,7 +214,7 @@ - (void)bindKeys
216
214
[commands registerKeyCommandWithInput: @" r"
217
215
modifierFlags: UIKeyModifierCommand
218
216
action: ^(__unused UIKeyCommand *command) {
219
- [weakSelf requestReload ];
217
+ [weakSelf reload ];
220
218
}];
221
219
#endif
222
220
}
@@ -273,7 +271,6 @@ - (void)reload
273
271
274
272
- (void )requestReload
275
273
{
276
- [[NSNotificationCenter defaultCenter ] postNotificationName: RCTReloadNotification object: self ];
277
274
[self reload ];
278
275
}
279
276
Original file line number Diff line number Diff line change @@ -563,7 +563,7 @@ - (RCTDevMenuAlertActionHandler)alertActionHandlerForDevItem:(RCTDevMenuItem *__
563
563
564
564
RCT_EXPORT_METHOD (reload)
565
565
{
566
- [_bridge requestReload ];
566
+ [_bridge reload ];
567
567
}
568
568
569
569
RCT_EXPORT_METHOD (debugRemotely:(BOOL )enableDebug)
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ - (instancetype)initWithDelegate:(id<RCTExceptionsManagerDelegate>)delegate
56
56
static NSUInteger reloadRetries = 0 ;
57
57
if (!RCT_DEBUG && reloadRetries < _maxReloadAttempts) {
58
58
reloadRetries++;
59
- [_bridge requestReload ];
59
+ [_bridge reload ];
60
60
} else {
61
61
NSString *description = [@" Unhandled JS Exception: " stringByAppendingString: message];
62
62
NSDictionary *errorInfo = @{ NSLocalizedDescriptionKey : description, RCTJSStackTraceKey: stack };
Original file line number Diff line number Diff line change @@ -451,8 +451,9 @@ - (void)redBoxWindow:(__unused RCTRedBoxWindow *)redBoxWindow openStackFrameInEd
451
451
[[[NSURLSession sharedSession ] dataTaskWithRequest: request] resume ];
452
452
}
453
453
454
- - (void )reloadFromRedBoxWindow : (__unused RCTRedBoxWindow *)redBoxWindow {
455
- [_bridge requestReload ];
454
+ - (void )reloadFromRedBoxWindow : (__unused RCTRedBoxWindow *)redBoxWindow
455
+ {
456
+ [_bridge reload ];
456
457
}
457
458
458
459
@end
Original file line number Diff line number Diff line change 10
10
#import " RCTProfile.h"
11
11
12
12
#import < dlfcn.h>
13
-
14
13
#import < libkern/OSAtomic.h>
15
14
#import < mach/mach.h>
16
15
#import < objc/message.h>
19
18
#import < UIKit/UIKit.h>
20
19
21
20
#import " RCTAssert.h"
22
- #import " RCTBridge.h"
23
21
#import " RCTBridge+Private.h"
22
+ #import " RCTBridge.h"
24
23
#import " RCTComponentData.h"
25
24
#import " RCTDefines.h"
25
+ #import " RCTJSCExecutor.h"
26
26
#import " RCTLog.h"
27
27
#import " RCTModuleData.h"
28
- #import " RCTUtils.h"
29
28
#import " RCTUIManager.h"
30
- #import " RCTJSCExecutor .h"
29
+ #import " RCTUtils .h"
31
30
32
31
NSString *const RCTProfileDidStartProfiling = @" RCTProfileDidStartProfiling" ;
33
32
NSString *const RCTProfileDidEndProfiling = @" RCTProfileDidEndProfiling" ;
@@ -363,7 +362,7 @@ + (void)vsync:(CADisplayLink *)displayLink
363
362
364
363
+ (void )reload
365
364
{
366
- [RCTProfilingBridge () requestReload ];
365
+ [RCTProfilingBridge () reload ];
367
366
}
368
367
369
368
+ (void )toggle : (UIButton *)target
You can’t perform that action at this time.
0 commit comments