hybrid-navigation 2.7.6 → 2.7.9
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/CHANGELOG.md +24 -0
- package/android/build.gradle +1 -1
- package/ios/HybridNavigation/Bridge/HBDNavigationModule.m +6 -7
- package/ios/HybridNavigation/Navigator/HBDStackNavigator.m +5 -4
- package/ios/HybridNavigation/ViewController/HBDTabBarController.m +3 -2
- package/ios/HybridNavigation/ViewController/UINavigationController+HBD.m +4 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
## 2.7.9 (2022-03-23)
|
|
2
|
+
|
|
3
|
+
### Android specific
|
|
4
|
+
|
|
5
|
+
- 修复 `Fragment is not an active fragment of FragmentManager`
|
|
6
|
+
|
|
7
|
+
## 2.7.8 (2022-03-03)
|
|
8
|
+
|
|
9
|
+
### ios specific
|
|
10
|
+
|
|
11
|
+
- 修复因 NSUInteger 导致的问题
|
|
12
|
+
|
|
13
|
+
```objc
|
|
14
|
+
for (NSUInteger i = count - 1; i > -1; i--) {
|
|
15
|
+
// 无法进入此区间
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 2.7.7 (2022-03-03)
|
|
20
|
+
|
|
21
|
+
### Android specific
|
|
22
|
+
|
|
23
|
+
- 修复因 2.7.6 导致的侧滑返回时,页面闪烁的问题
|
|
24
|
+
|
|
1
25
|
## 2.7.6 (2022-03-02)
|
|
2
26
|
|
|
3
27
|
### Android specific
|
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:12.0.
|
|
36
|
+
api 'io.github.listenzz:AndroidNavigation:12.0.8'
|
|
37
37
|
}
|
|
@@ -182,13 +182,12 @@ RCT_EXPORT_METHOD(findSceneIdByModuleName:
|
|
|
182
182
|
|
|
183
183
|
UIApplication *application = [[UIApplication class] performSelector:@selector(sharedApplication)];
|
|
184
184
|
NSString *sceneId = nil;
|
|
185
|
-
NSUInteger index = application.windows.count - 1;
|
|
186
|
-
|
|
187
185
|
NSString *moduleName = params[@"moduleName"];
|
|
188
186
|
Promise *promise = params[@"promise"];
|
|
189
187
|
|
|
190
|
-
|
|
191
|
-
|
|
188
|
+
NSUInteger index = application.windows.count;
|
|
189
|
+
while (index > 0 && sceneId == nil) {
|
|
190
|
+
UIWindow *window = application.windows[index - 1];
|
|
192
191
|
sceneId = [self findSceneIdByModuleName:moduleName withViewController:window.rootViewController];
|
|
193
192
|
index--;
|
|
194
193
|
}
|
|
@@ -216,9 +215,9 @@ RCT_EXPORT_METHOD(findSceneIdByModuleName:
|
|
|
216
215
|
NSArray<UIViewController *> *children = vc.childViewControllers;
|
|
217
216
|
NSUInteger count = children.count;
|
|
218
217
|
if (count > 0) {
|
|
219
|
-
NSUInteger index = count
|
|
220
|
-
while (index >
|
|
221
|
-
UIViewController *child = children[index];
|
|
218
|
+
NSUInteger index = count;
|
|
219
|
+
while (index > 0 && sceneId == nil) {
|
|
220
|
+
UIViewController *child = children[index - 1];
|
|
222
221
|
sceneId = [self findSceneIdByModuleName:moduleName withViewController:child];
|
|
223
222
|
index--;
|
|
224
223
|
}
|
|
@@ -98,12 +98,13 @@
|
|
|
98
98
|
NSUInteger count = children.count;
|
|
99
99
|
NSString *moduleName = extras[@"moduleName"];
|
|
100
100
|
BOOL inclusive = [extras[@"inclusive"] boolValue];
|
|
101
|
-
for (NSUInteger i = count
|
|
102
|
-
|
|
101
|
+
for (NSUInteger i = count; i > 0; i--) {
|
|
102
|
+
NSUInteger index = i - 1;
|
|
103
|
+
HBDViewController *vc = children[index];
|
|
103
104
|
if ([moduleName isEqualToString:vc.moduleName] || [moduleName isEqualToString:vc.sceneId]) {
|
|
104
105
|
viewController = vc;
|
|
105
|
-
if (inclusive && i
|
|
106
|
-
viewController = children[
|
|
106
|
+
if (inclusive && i > 0) {
|
|
107
|
+
viewController = children[index];
|
|
107
108
|
}
|
|
108
109
|
break;
|
|
109
110
|
}
|
|
@@ -105,8 +105,9 @@
|
|
|
105
105
|
|
|
106
106
|
- (void)removeTabBarAboriginal {
|
|
107
107
|
NSUInteger count = self.tabBar.subviews.count;
|
|
108
|
-
for (
|
|
109
|
-
|
|
108
|
+
for (NSUInteger i = count; i > 0; i--) {
|
|
109
|
+
NSUInteger index = i - 1;
|
|
110
|
+
UIView *view = self.tabBar.subviews[index];
|
|
110
111
|
NSString *viewName = [[[view classForCoder] description] stringByReplacingOccurrencesOfString:@"_" withString:@""];
|
|
111
112
|
if ([viewName isEqualToString:@"UITabBarButton"]) {
|
|
112
113
|
[view removeFromSuperview];
|
|
@@ -17,9 +17,10 @@
|
|
|
17
17
|
- (void)redirectToViewController:(UIViewController *)controller target:(UIViewController *)target animated:(BOOL)animated {
|
|
18
18
|
NSMutableArray *children = [self.childViewControllers mutableCopy];
|
|
19
19
|
NSUInteger count = self.childViewControllers.count;
|
|
20
|
-
for (NSUInteger i = count
|
|
21
|
-
|
|
22
|
-
[
|
|
20
|
+
for (NSUInteger i = count; i > 0; i--) {
|
|
21
|
+
NSUInteger index = i - 1;
|
|
22
|
+
UIViewController *child = children[index];
|
|
23
|
+
[children removeObjectAtIndex:index];
|
|
23
24
|
if (child == target) {
|
|
24
25
|
break;
|
|
25
26
|
}
|