react-native-navigation 8.3.2-snapshot.1877 → 8.4.0-snapshot.1887
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
#import "RNNTurboCommandsHandler.h"
|
|
12
12
|
#import <React-RuntimeApple/ReactCommon/RCTHost.h>
|
|
13
13
|
|
|
14
|
-
@interface RNNTurboManager ()
|
|
15
14
|
|
|
15
|
+
@interface RNNTurboManager ()
|
|
16
16
|
@property(nonatomic, strong, readwrite) RNNExternalComponentStore *store;
|
|
17
17
|
@property(nonatomic, strong, readwrite) RNNReactComponentRegistry *componentRegistry;
|
|
18
18
|
@property(nonatomic, strong, readonly) RNNLayoutManager *layoutManager;
|
|
@@ -21,15 +21,16 @@
|
|
|
21
21
|
@property(nonatomic, strong, readonly) RNNModalHostViewManagerHandler *modalHostViewHandler;
|
|
22
22
|
@property(nonatomic, strong, readonly) RNNCommandsHandler *commandsHandler;
|
|
23
23
|
@property(nonatomic, strong, readonly) RNNEventEmitter *eventEmitter;
|
|
24
|
-
|
|
25
24
|
@end
|
|
26
25
|
|
|
27
26
|
@implementation RNNTurboManager {
|
|
28
27
|
UIWindow *_mainWindow;
|
|
28
|
+
BOOL _isInitialRun;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
- (instancetype)initWithHost:(RCTHost *)host mainWindow:(UIWindow *)mainWindow {
|
|
32
32
|
if (self = [super init]) {
|
|
33
|
+
_isInitialRun = YES;
|
|
33
34
|
_host = host;
|
|
34
35
|
_mainWindow = mainWindow;
|
|
35
36
|
_overlayManager = [RNNOverlayManager new];
|
|
@@ -40,7 +41,12 @@
|
|
|
40
41
|
name:@"RCTInstanceDidLoadBundle"
|
|
41
42
|
object:nil];
|
|
42
43
|
|
|
43
|
-
|
|
44
|
+
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
45
|
+
selector:@selector(onReload)
|
|
46
|
+
name:@"RCTTriggerReloadCommandNotification"
|
|
47
|
+
object:nil];
|
|
48
|
+
|
|
49
|
+
// TODO: investigate which new event is fired
|
|
44
50
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
45
51
|
selector:@selector(onJavaScriptWillLoad)
|
|
46
52
|
name:RCTJavaScriptWillStartLoadingNotification
|
|
@@ -99,16 +105,24 @@
|
|
|
99
105
|
}
|
|
100
106
|
|
|
101
107
|
- (void)onJavaScriptLoaded {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
RCTExecuteOnMainQueue(^{
|
|
109
|
+
// TODO: the isInitialRun is the right and final answer for this, this will stop a blackscreen appearing after the splashscreen on startup. OnReload this will still happen because of the rootViewController = nil; which is needed to clean up what is already appearing.
|
|
110
|
+
if (!self->_isInitialRun) {
|
|
111
|
+
UIApplication.sharedApplication.delegate.window.rootViewController = nil;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
self-> _isInitialRun = NO;
|
|
115
|
+
|
|
116
|
+
[self->_commandsHandler setReadyToReceiveCommands:true];
|
|
117
|
+
// TODO: Refactor
|
|
118
|
+
// [_modalHostViewHandler
|
|
119
|
+
// connectModalHostViewManager:[[_host moduleRegistry] moduleForName:"RCTModalHostViewManager"]];
|
|
120
|
+
|
|
121
|
+
[self->_eventEmitter sendOnAppLaunched];
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
- (void)onReload {
|
|
112
126
|
}
|
|
113
127
|
|
|
114
128
|
@end
|
package/package.json
CHANGED