@momo-kits/foundation 0.165.1-beta.4 → 0.165.1-beta.5
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/Application/BottomTab/index.tsx +14 -14
- package/package.json +1 -1
|
@@ -233,18 +233,17 @@ const BottomTab: React.FC<BottomTabProps> = ({
|
|
|
233
233
|
});
|
|
234
234
|
}, [itemWidth, indicatorAnimated]);
|
|
235
235
|
|
|
236
|
-
//
|
|
237
|
-
//
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
// );
|
|
236
|
+
// Focus, not mount: pushing a screen from a tab leaves BottomTab mounted but blurred, and
|
|
237
|
+
// onFocus only fires on tab changes.
|
|
238
|
+
useFocusEffect(
|
|
239
|
+
React.useCallback(() => {
|
|
240
|
+
NativeModules?.MiniAppModule?.setShouldUseFloatingArrowBack?.(
|
|
241
|
+
activeIndex.current !== 0,
|
|
242
|
+
);
|
|
243
|
+
return () =>
|
|
244
|
+
NativeModules?.MiniAppModule?.setShouldUseFloatingArrowBack?.(false);
|
|
245
|
+
}, []),
|
|
246
|
+
);
|
|
248
247
|
|
|
249
248
|
const onFocus = (e: any) => {
|
|
250
249
|
activeIndex.current = tabs.findIndex(i => e.target.includes(i.name));
|
|
@@ -253,10 +252,11 @@ const BottomTab: React.FC<BottomTabProps> = ({
|
|
|
253
252
|
});
|
|
254
253
|
|
|
255
254
|
const isFirstTab = activeIndex.current === 0;
|
|
255
|
+
const gestureEnabled = Platform.OS === 'ios' && isFirstTab;
|
|
256
256
|
navigation?.setOptions({
|
|
257
|
-
gestureEnabled:
|
|
257
|
+
gestureEnabled: gestureEnabled,
|
|
258
258
|
});
|
|
259
|
-
NativeModules?.MiniAppModule?.setShouldUseFloatingArrowBack?.(!
|
|
259
|
+
NativeModules?.MiniAppModule?.setShouldUseFloatingArrowBack?.(!gestureEnabled);
|
|
260
260
|
};
|
|
261
261
|
|
|
262
262
|
const handler: {
|