react-native-navigation 8.4.2 → 8.4.3-snapshot.1908

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.
@@ -7,6 +7,7 @@ import android.content.Context;
7
7
  import android.os.Bundle;
8
8
  import android.view.MotionEvent;
9
9
  import android.view.View;
10
+ import android.view.ViewGroup;
10
11
  import android.widget.FrameLayout;
11
12
 
12
13
  import androidx.annotation.RestrictTo;
@@ -71,7 +72,7 @@ public class ReactView extends FrameLayout implements IReactView, Renderable {
71
72
  }
72
73
 
73
74
  public void sendComponentWillStart(ComponentType type) {
74
- this.post(()->{
75
+ this.post(() -> {
75
76
  ReactContext currentReactContext = getReactContext();
76
77
  if (currentReactContext != null)
77
78
  new EventEmitter(currentReactContext).emitComponentWillAppear(componentId, componentName, type);
@@ -79,7 +80,7 @@ public class ReactView extends FrameLayout implements IReactView, Renderable {
79
80
  }
80
81
 
81
82
  public void sendComponentStart(ComponentType type) {
82
- this.post(()->{
83
+ this.post(() -> {
83
84
  ReactContext currentReactContext = getReactContext();
84
85
  if (currentReactContext != null) {
85
86
  new EventEmitter(currentReactContext).emitComponentDidAppear(componentId, componentName, type);
@@ -117,7 +118,12 @@ public class ReactView extends FrameLayout implements IReactView, Renderable {
117
118
 
118
119
  @Override
119
120
  public boolean isRendered() {
120
- return getChildCount() >= 1;
121
+ ViewGroup view = reactSurface.getView();
122
+ if (view != null) {
123
+ return view.getChildCount() >= 1;
124
+ }
125
+
126
+ return false;
121
127
  }
122
128
 
123
129
  public EventDispatcher getEventDispatcher() {
@@ -131,7 +137,7 @@ public class ReactView extends FrameLayout implements IReactView, Renderable {
131
137
  }
132
138
 
133
139
  private ReactHost getReactHost() {
134
- return ((ReactApplication)getContext().getApplicationContext()).getReactHost();
140
+ return ((ReactApplication) getContext().getApplicationContext()).getReactHost();
135
141
  }
136
142
 
137
143
  private ReactContext getReactContext() {
@@ -78,9 +78,17 @@
78
78
  - (void)surface:(__unused RCTSurface *)surface didChangeStage:(RCTSurfaceStage)stage {
79
79
  RCTExecuteOnMainQueue(^{
80
80
  [super surface:surface didChangeStage:stage];
81
- [self reactViewReady];
81
+ [[NSNotificationCenter defaultCenter] addObserver:self
82
+ selector:@selector(contentDidAppear:)
83
+ name:RCTContentDidAppearNotification
84
+ object:nil];
82
85
  });
83
86
  }
87
+
88
+ - (void)contentDidAppear:(NSNotification *)notification {
89
+ [self reactViewReady];
90
+ }
91
+
84
92
  #else
85
93
 
86
94
  - (void)contentDidAppear:(NSNotification *)notification {
@@ -96,9 +104,9 @@
96
104
  _reactViewReadyBlock();
97
105
  _reactViewReadyBlock = nil;
98
106
  }
99
- #ifndef RCT_NEW_ARCH_ENABLED
107
+
100
108
  [[NSNotificationCenter defaultCenter] removeObserver:self];
101
- #endif
109
+
102
110
  }
103
111
 
104
112
  #pragma mark - RNNComponentProtocol
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-navigation",
3
- "version": "8.4.2",
3
+ "version": "8.4.3-snapshot.1908",
4
4
  "description": "React Native Navigation - truly native navigation for iOS and Android",
5
5
  "license": "MIT",
6
6
  "nativePackage": true,