hybrid-navigation 2.17.7 → 2.17.8

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.
@@ -33,5 +33,5 @@ dependencies {
33
33
  implementation fileTree(dir: 'libs', include: ['*.jar'])
34
34
  implementation 'com.facebook.react:react-native:+'
35
35
  // api project(':navigation')
36
- api 'io.github.listenzz:AndroidNavigation:13.6.9'
36
+ api 'io.github.listenzz:AndroidNavigation:13.7.0'
37
37
  }
@@ -12,6 +12,7 @@ import static com.reactnative.hybridnavigation.HBDEventEmitter.ON_COMPONENT_APPE
12
12
  import static com.reactnative.hybridnavigation.HBDEventEmitter.ON_COMPONENT_DISAPPEAR;
13
13
  import static com.reactnative.hybridnavigation.HBDEventEmitter.ON_COMPONENT_RESULT;
14
14
 
15
+ import android.annotation.SuppressLint;
15
16
  import android.content.pm.ActivityInfo;
16
17
  import android.graphics.Color;
17
18
  import android.os.Bundle;
@@ -142,13 +143,13 @@ public class ReactFragment extends HybridFragment implements ReactBridgeManager.
142
143
  }
143
144
  }
144
145
 
146
+ @SuppressLint("SourceLockedOrientationActivity")
145
147
  @Override
146
148
  public void onStop() {
147
- super.onStop();
148
- if (forceScreenLandscape() && isRemoving()) {
149
- requireActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
150
- unmountReactView();
149
+ if (isRemoving() && forceScreenLandscape()) {
150
+ requireActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
151
151
  }
152
+ super.onStop();
152
153
  }
153
154
 
154
155
  @Override
@@ -163,14 +164,14 @@ public class ReactFragment extends HybridFragment implements ReactBridgeManager.
163
164
 
164
165
  private void unmountReactView() {
165
166
  getReactBridgeManager().removeReactBridgeReloadListener(this);
166
-
167
+
167
168
  ReactContext reactContext = getCurrentReactContext();
168
169
  if (reactContext == null || !reactContext.hasActiveCatalystInstance()) {
169
170
  return;
170
171
  }
171
172
 
172
173
  if (reactRootView != null) {
173
- FLog.w(TAG, "销毁页面:" + getModuleName());
174
+ FLog.w(TAG, "销毁页面-:" + getModuleName());
174
175
  reactRootView.unmountReactApplication();
175
176
  ViewGroup parent = (ViewGroup) reactRootView.getParent();
176
177
  parent.removeView(reactRootView);
@@ -129,7 +129,7 @@ public class ScreenNavigator implements Navigator {
129
129
  }
130
130
  presented.setPresentationStyle(PresentationStyle.OverFullScreen);
131
131
  int requestCode = extras.getInt("requestCode");
132
- presenting.presentFragment(presented, requestCode, () -> callback.invoke(null, true), TransitionAnimation.Fade);
132
+ presenting.presentFragment(presented, requestCode, () -> callback.invoke(null, true), TransitionAnimation.None);
133
133
  }
134
134
 
135
135
  private void handlePresentLayout(@NonNull AwesomeFragment presenting, @NonNull ReadableMap extras, @NonNull Callback callback) {
@@ -164,11 +164,11 @@ public class ScreenNavigator implements Navigator {
164
164
  presented.setPresentationStyle(PresentationStyle.OverFullScreen);
165
165
  int requestCode = extras.getInt("requestCode");
166
166
 
167
- presenting.presentFragment(presented, requestCode, () -> callback.invoke(null, true), TransitionAnimation.Fade);
167
+ presenting.presentFragment(presented, requestCode, () -> callback.invoke(null, true), TransitionAnimation.None);
168
168
  }
169
169
 
170
170
  private void handleHideModal(@NonNull AwesomeFragment presented, @NonNull Callback callback) {
171
- presented.dismissFragment(() -> callback.invoke(null, true), TransitionAnimation.Fade);
171
+ presented.dismissFragment(() -> callback.invoke(null, true), TransitionAnimation.None);
172
172
  }
173
173
 
174
174
  private void handleDismiss(@NonNull AwesomeFragment presented, @NonNull Callback callback) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hybrid-navigation",
3
3
  "description": "React Native Navigation that supports seamless navigation between Native and React.",
4
- "version": "2.17.7",
4
+ "version": "2.17.8",
5
5
  "main": "./lib/index.js",
6
6
  "typings": "./lib/index.d.ts",
7
7
  "react-native": "src/index",