hybrid-navigation 2.18.12 → 2.18.13
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.
package/android/build.gradle
CHANGED
|
@@ -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.8.
|
|
36
|
+
api 'io.github.listenzz:AndroidNavigation:13.8.4'
|
|
37
37
|
}
|
|
@@ -88,8 +88,14 @@ public class ReactFragment extends HybridFragment implements ReactBridgeManager.
|
|
|
88
88
|
if (!forceScreenLandscape() &&
|
|
89
89
|
!Navigator.MODE_MODAL.equals(Navigator.Util.getMode(this)) &&
|
|
90
90
|
requireActivity().getRequestedOrientation() != ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) {
|
|
91
|
+
requireView().clearAnimation();
|
|
91
92
|
requireActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
|
92
93
|
}
|
|
94
|
+
|
|
95
|
+
if (forceScreenLandscape()) {
|
|
96
|
+
requireView().clearAnimation();
|
|
97
|
+
requireActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
|
|
98
|
+
}
|
|
93
99
|
}
|
|
94
100
|
|
|
95
101
|
@Override
|
|
@@ -104,6 +110,7 @@ public class ReactFragment extends HybridFragment implements ReactBridgeManager.
|
|
|
104
110
|
public void onStart() {
|
|
105
111
|
super.onStart();
|
|
106
112
|
if (forceScreenLandscape()) {
|
|
113
|
+
requireView().clearAnimation();
|
|
107
114
|
requireActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
|
|
108
115
|
}
|
|
109
116
|
}
|
package/dist/Navigator.js
CHANGED
|
@@ -77,6 +77,7 @@ class Navigator {
|
|
|
77
77
|
moduleName,
|
|
78
78
|
inclusive,
|
|
79
79
|
from: this.moduleName,
|
|
80
|
+
to: moduleName,
|
|
80
81
|
});
|
|
81
82
|
popToRoot = () => Navigation.dispatch(this.sceneId, 'popToRoot', { from: this.moduleName });
|
|
82
83
|
redirectTo = (moduleName, props = {}, options = {}) => Navigation.dispatch(this.sceneId, 'redirectTo', {
|
|
@@ -96,6 +96,13 @@
|
|
|
96
96
|
return NO;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
- (void)viewWillAppear:(BOOL)animated {
|
|
100
|
+
[super viewWillAppear:animated];
|
|
101
|
+
if (!self.navigationController.transitionCoordinator.interactive) {
|
|
102
|
+
[self adjustScreenOrientation];
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
99
106
|
- (void)viewDidAppear:(BOOL)animated {
|
|
100
107
|
[super viewDidAppear:animated];
|
|
101
108
|
[[HBDAnimationObserver sharedObserver] endAnimation];
|
|
@@ -103,16 +110,7 @@
|
|
|
103
110
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(statusBarFrameWillChange:) name:UIApplicationWillChangeStatusBarFrameNotification object:nil];
|
|
104
111
|
}
|
|
105
112
|
|
|
106
|
-
|
|
107
|
-
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.016 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
108
|
-
UIWindowScene *windowScene = [self getWindowScene];
|
|
109
|
-
if (windowScene != nil) {
|
|
110
|
-
if (!self.forceScreenLandscape && windowScene.interfaceOrientation != UIInterfaceOrientationPortrait && ![[self hbd_mode] isEqual:@"modal"]) {
|
|
111
|
-
[self setScreenOrientation:UIInterfaceOrientationPortrait usingMask:UIInterfaceOrientationMaskPortrait];
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
}
|
|
113
|
+
[self adjustScreenOrientation];
|
|
116
114
|
}
|
|
117
115
|
|
|
118
116
|
- (void)viewDidDisappear:(BOOL)animated {
|
|
@@ -122,6 +120,19 @@
|
|
|
122
120
|
}
|
|
123
121
|
}
|
|
124
122
|
|
|
123
|
+
- (void)adjustScreenOrientation {
|
|
124
|
+
if (@available(iOS 15.0, *)) {
|
|
125
|
+
UIWindowScene *windowScene = [self getWindowScene];
|
|
126
|
+
if (!self.forceScreenLandscape && windowScene != nil && windowScene.interfaceOrientation != UIInterfaceOrientationPortrait && ![[self hbd_mode] isEqual:@"modal"]) {
|
|
127
|
+
[self setScreenOrientation:UIInterfaceOrientationPortrait usingMask:UIInterfaceOrientationMaskPortrait];
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if (self.forceScreenLandscape) {
|
|
131
|
+
[self setScreenOrientation:UIInterfaceOrientationLandscapeRight usingMask:UIInterfaceOrientationMaskLandscape];
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
125
136
|
- (void)willMoveToParentViewController:(UIViewController *)parent {
|
|
126
137
|
if (self.forceScreenLandscape) {
|
|
127
138
|
if (parent) {
|
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.18.
|
|
4
|
+
"version": "2.18.13",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"typings": "./dist/index.d.ts",
|
|
7
7
|
"react-native": "src/index",
|
package/src/Navigator.ts
CHANGED