react-native-navigation 7.40.2 → 7.40.3-snapshot.402
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.
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
NSUInteger _previousTabIndex;
|
|
14
14
|
BottomTabsBaseAttacher *_bottomTabsAttacher;
|
|
15
15
|
BOOL _tabBarNeedsRestore;
|
|
16
|
+
RNNNavigationOptions *_options;
|
|
17
|
+
BOOL _didFinishSetup;
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
- (instancetype)initWithLayoutInfo:(RNNLayoutInfo *)layoutInfo
|
|
@@ -28,14 +30,24 @@
|
|
|
28
30
|
_bottomTabsAttacher = bottomTabsAttacher;
|
|
29
31
|
_bottomTabPresenter = bottomTabPresenter;
|
|
30
32
|
_dotIndicatorPresenter = dotIndicatorPresenter;
|
|
33
|
+
_options = options;
|
|
34
|
+
_didFinishSetup = NO;
|
|
35
|
+
|
|
36
|
+
IntNumber *currentTabIndex = options.bottomTabs.currentTabIndex;
|
|
37
|
+
if ([currentTabIndex hasValue]) {
|
|
38
|
+
NSUInteger currentTabIndexValue = [currentTabIndex get];
|
|
39
|
+
_previousTabIndex = currentTabIndexValue;
|
|
40
|
+
_currentTabIndex = currentTabIndexValue;
|
|
41
|
+
}
|
|
31
42
|
|
|
32
43
|
self = [super initWithLayoutInfo:layoutInfo
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
creator:creator
|
|
45
|
+
options:options
|
|
46
|
+
defaultOptions:defaultOptions
|
|
47
|
+
presenter:presenter
|
|
48
|
+
eventEmitter:eventEmitter
|
|
49
|
+
childViewControllers:childViewControllers];
|
|
50
|
+
|
|
39
51
|
if (@available(iOS 13.0, *)) {
|
|
40
52
|
self.tabBar.standardAppearance = [UITabBarAppearance new];
|
|
41
53
|
}
|
|
@@ -52,6 +64,7 @@
|
|
|
52
64
|
action:@selector(handleLongPressGesture:)];
|
|
53
65
|
[self.tabBar addGestureRecognizer:self.longPressRecognizer];
|
|
54
66
|
|
|
67
|
+
_didFinishSetup = YES;
|
|
55
68
|
return self;
|
|
56
69
|
}
|
|
57
70
|
|
|
@@ -124,8 +137,15 @@
|
|
|
124
137
|
}
|
|
125
138
|
|
|
126
139
|
- (void)setSelectedIndex:(NSUInteger)selectedIndex {
|
|
127
|
-
|
|
128
|
-
[
|
|
140
|
+
IntNumber *currentTabIndex = _options.bottomTabs.currentTabIndex;
|
|
141
|
+
if ([currentTabIndex hasValue] && !_didFinishSetup) {
|
|
142
|
+
NSUInteger currentTabIndexValue = [currentTabIndex get];
|
|
143
|
+
_currentTabIndex = currentTabIndexValue;
|
|
144
|
+
} else {
|
|
145
|
+
_currentTabIndex = selectedIndex;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
[super setSelectedIndex:_currentTabIndex];
|
|
129
149
|
}
|
|
130
150
|
|
|
131
151
|
- (UIViewController *)selectedViewController {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-navigation",
|
|
3
|
-
"version": "7.40.
|
|
3
|
+
"version": "7.40.3-snapshot.402",
|
|
4
4
|
"description": "React Native Navigation - truly native navigation for iOS and Android",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"nativePackage": true,
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@react-native/metro-config": "^0.73.2",
|
|
78
78
|
"@react-native/babel-preset": "^0.73.18",
|
|
79
79
|
"@react-native/typescript-config": "^0.73.1",
|
|
80
|
-
"@react-native-community/blur": "^
|
|
80
|
+
"@react-native-community/blur": "^4.4.1",
|
|
81
81
|
"@react-native-community/datetimepicker": "^3.4.7",
|
|
82
82
|
"@react-native-community/eslint-config": "2.0.0",
|
|
83
83
|
"@react-native-community/netinfo": "^5.9.4",
|