@applicaster/zapp-react-native-app 14.0.0-alpha.1473000722 → 14.0.0-alpha.1540936784

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.
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import * as R from "ramda";
3
3
 
4
- import { View, StyleSheet } from "react-native";
4
+ import { View } from "react-native";
5
5
 
6
6
  import {
7
7
  getNavigationProps,
@@ -39,13 +39,10 @@ import {
39
39
  PushTopicManagerConsts,
40
40
  PushTopicManagerEvents,
41
41
  } from "@applicaster/zapp-react-native-bridge/PushNotifications/PushTopicManager";
42
- import { useSafeAreaInsets } from "react-native-safe-area-context";
43
42
 
44
- const styles = StyleSheet.create({
45
- container: {
46
- height: "100%",
47
- },
48
- });
43
+ const containerStyle = {
44
+ height: "100%",
45
+ };
49
46
 
50
47
  const LayoutWithMenu = () => {
51
48
  const {
@@ -66,7 +63,6 @@ const LayoutWithMenu = () => {
66
63
  const isRTL = useIsRTL();
67
64
  const navigator = useNavigation();
68
65
  const bottomTabBarHeight = useGetBottomTabBarHeight();
69
- const { bottom: safeAreaBottomInset } = useSafeAreaInsets();
70
66
  const { title } = useNavbarState();
71
67
 
72
68
  const { activeRiver, videoModalState, isVideoModalDocked } = navigator;
@@ -98,38 +94,36 @@ const LayoutWithMenu = () => {
98
94
  * otherwise hidden if videoModalState - visible
99
95
  * also check isMenuVisible
100
96
  */
101
- const showMenu = React.useMemo(
102
- () =>
103
- ((videoModalState.visible &&
104
- (videoModalState.mode === "MINIMIZED" ||
105
- (videoModalState.mode === "MAXIMIZED" && isActiveGesture))) ||
106
- !videoModalState.visible) &&
107
- isMenuVisible(navigator.currentRoute, navigator.screenData),
108
- [
109
- videoModalState.visible,
110
- videoModalState.mode,
111
- navigator.currentRoute,
112
- isActiveGesture,
113
- ]
114
- );
97
+ const showMenu = React.useMemo(() => {
98
+ if (!videoModalState.visible) {
99
+ return isMenuVisible(navigator.currentRoute, navigator.screenData);
100
+ } else {
101
+ if (videoModalState.mode === "FULLSCREEN") {
102
+ return false;
103
+ }
104
+ }
105
+
106
+ return isMenuVisible(navigator.currentRoute, navigator.screenData);
107
+ }, [
108
+ videoModalState.visible,
109
+ videoModalState.mode,
110
+ navigator.currentRoute,
111
+ isActiveGesture,
112
+ ]);
115
113
 
116
114
  const isBottomTabsPlugin = plugin?.identifier === "quick-brick-bottom-tabs";
117
115
 
118
- const paddingBottom =
119
- showMenu && isBottomTabsPlugin
120
- ? bottomTabBarHeight + safeAreaBottomInset
121
- : 0; // if activeRiver?.navigations has quick-brick-bottom-tabs - append bottomTabBarHeight as padding
116
+ const paddingBottom = React.useMemo(() => {
117
+ return showMenu && isBottomTabsPlugin ? bottomTabBarHeight : 0; // if activeRiver?.navigations has quick-brick-bottom-tabs - append bottomTabBarHeight as padding
118
+ }, [showMenu, isBottomTabsPlugin, bottomTabBarHeight]);
122
119
 
123
120
  const contentStyle = React.useMemo(
124
- () =>
125
- StyleSheet.flatten([
126
- styles.container,
127
- {
128
- paddingBottom,
129
- opacity: videoModalState.visible && !isVideoModalDocked ? 0 : 1,
130
- },
131
- ]),
132
- [videoModalState.visible, isVideoModalDocked]
121
+ () => ({
122
+ ...containerStyle,
123
+ paddingBottom,
124
+ opacity: videoModalState.visible && !isVideoModalDocked ? 0 : 1,
125
+ }),
126
+ [videoModalState.visible, isVideoModalDocked, paddingBottom]
133
127
  );
134
128
 
135
129
  const menuProps = React.useMemo(() => {
@@ -173,7 +167,7 @@ const LayoutWithMenu = () => {
173
167
  return (
174
168
  <>
175
169
  {appReady ? (
176
- <View style={styles.container}>
170
+ <View style={containerStyle}>
177
171
  <Transitioner
178
172
  transitionConfig={transitionConfig}
179
173
  contentStyle={contentStyle}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-app",
3
- "version": "14.0.0-alpha.1473000722",
3
+ "version": "14.0.0-alpha.1540936784",
4
4
  "description": "Zapp App Component for Applicaster's Quick Brick React Native App",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -27,11 +27,11 @@
27
27
  },
28
28
  "homepage": "https://github.com/applicaster/quickbrick#readme",
29
29
  "dependencies": {
30
- "@applicaster/quick-brick-core": "14.0.0-alpha.1473000722",
31
- "@applicaster/zapp-react-native-bridge": "14.0.0-alpha.1473000722",
32
- "@applicaster/zapp-react-native-redux": "14.0.0-alpha.1473000722",
33
- "@applicaster/zapp-react-native-ui-components": "14.0.0-alpha.1473000722",
34
- "@applicaster/zapp-react-native-utils": "14.0.0-alpha.1473000722",
30
+ "@applicaster/quick-brick-core": "14.0.0-alpha.1540936784",
31
+ "@applicaster/zapp-react-native-bridge": "14.0.0-alpha.1540936784",
32
+ "@applicaster/zapp-react-native-redux": "14.0.0-alpha.1540936784",
33
+ "@applicaster/zapp-react-native-ui-components": "14.0.0-alpha.1540936784",
34
+ "@applicaster/zapp-react-native-utils": "14.0.0-alpha.1540936784",
35
35
  "axios": "^0.28.0",
36
36
  "camelize": "^1.0.0",
37
37
  "query-string": "7.1.3",