@fto-consult/expo-ui 6.70.2 → 6.70.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "6.70.2",
3
+ "version": "6.70.3",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "main",
6
6
  "scripts": {
@@ -71,7 +71,7 @@
71
71
  "@expo/html-elements": "^0.5.1",
72
72
  "@expo/vector-icons": "^13.0.0",
73
73
  "@faker-js/faker": "^8.0.2",
74
- "@fto-consult/common": "^3.58.1",
74
+ "@fto-consult/common": "^3.59.3",
75
75
  "@pchmn/expo-material3-theme": "^1.3.1",
76
76
  "@react-native-async-storage/async-storage": "1.18.2",
77
77
  "@react-native-community/datetimepicker": "7.2.0",
@@ -42,8 +42,7 @@ import { StyleSheet } from "react-native";
42
42
  import Logo from "$ecomponents/Logo";
43
43
  import AppEntryRootView from "./RootView";
44
44
  import { SafeAreaProvider } from 'react-native-safe-area-context';
45
- import { Dimensions,Keyboard } from 'react-native';
46
- import {isTouchDevice} from "$platform";
45
+ import {Keyboard } from 'react-native';
47
46
 
48
47
 
49
48
  let MAX_BACK_COUNT = 1;
@@ -12,9 +12,9 @@ import { screenName as aboutScreenName} from "$escreens/Help/About";
12
12
  import theme from "$theme";
13
13
  import APP from "$capp/instance";
14
14
  import useExpoUI from "$econtext/hooks";
15
- import Auth from "$cauth";
15
+ import Auth,{useIsSignedIn} from "$cauth";
16
16
  import {getTableDataListRouteName} from "$enavigation/utils";
17
- import {isValidElement} from "$react";
17
+ import {isValidElement,usePrevious} from "$react";
18
18
 
19
19
  const useGetItems = (options)=>{
20
20
  const {navigation:{drawerItems,drawerSections,drawerItemsMutator},tablesData} = useContext();
@@ -24,6 +24,7 @@ const useGetItems = (options)=>{
24
24
  const {handleHelpScreen} = useExpoUI();
25
25
  const handleHelp = handleHelpScreen !== false;
26
26
  const refreshItemsRef = useRef(false);
27
+ const isSignedIn = useIsSignedIn();
27
28
  useEffect(()=>{
28
29
  const refreshItems = (...a)=>{
29
30
  refreshItemsRef.current = !refreshItemsRef.current;
@@ -32,13 +33,9 @@ const useGetItems = (options)=>{
32
33
  }
33
34
  }
34
35
  APP.on(APP.EVENTS.REFRESH_MAIN_DRAWER,refreshItems);
35
- APP.on(APP.EVENTS.AUTH_LOGIN_USER,refreshItems);
36
- APP.on(APP.EVENTS.AUTH_LOGOUT_USER,refreshItems);
37
36
  //APP.on(APP.EVENTS.UPDATE_THEME,refreshItems);
38
37
  return ()=>{
39
38
  APP.off(APP.EVENTS.REFRESH_MAIN_DRAWER,refreshItems);
40
- APP.off(APP.EVENTS.AUTH_LOGIN_USER,refreshItems);
41
- APP.off(APP.EVENTS.AUTH_LOGOUT_USER,refreshItems);
42
39
  //APP.off(APP.EVENTS.UPDATE_THEME,refreshItems);
43
40
  }
44
41
  },[])
@@ -140,7 +137,7 @@ const useGetItems = (options)=>{
140
137
  }
141
138
  });
142
139
  return items;
143
- },[showProfilOnDrawer,handleHelp,refreshItemsRef.current,force])
140
+ },[showProfilOnDrawer,handleHelp,refreshItemsRef.current,force,isSignedIn])
144
141
  }
145
142
 
146
143
  export default useGetItems;