esoftplay 0.0.191 → 0.0.192

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.
@@ -21,12 +21,24 @@ import esp from 'esoftplay/esp';
21
21
  import moment from 'esoftplay/moment';
22
22
  import useSafeState from 'esoftplay/state';
23
23
  import { useFonts } from 'expo-font';
24
+ import * as SplashScreen from 'expo-splash-screen';
24
25
  import { useLayoutEffect } from 'react';
25
- import { View } from 'react-native';
26
+ import { Dimensions, Platform, SafeAreaView, StatusBar, View } from 'react-native';
26
27
  import { GestureHandlerRootView } from 'react-native-gesture-handler';
27
28
  import { KeyboardProvider } from "react-native-keyboard-controller";
28
29
 
29
30
 
31
+ import {
32
+ configureReanimatedLogger,
33
+ ReanimatedLogLevel,
34
+ } from 'react-native-reanimated';
35
+
36
+ // This is the default configuration
37
+ configureReanimatedLogger({
38
+ level: ReanimatedLogLevel.warn,
39
+ strict: true, // Reanimated runs in strict mode by default
40
+ });
41
+
30
42
  export interface UserIndexProps {
31
43
 
32
44
  }
@@ -45,9 +57,10 @@ function getFontConfig() {
45
57
  return fonts
46
58
  }
47
59
 
48
-
60
+ SplashScreen.preventAutoHideAsync();
49
61
 
50
62
  /** Klik [disini](https://github.com/dev-esoftplay/mobile-docs/blob/main/modules/user/index.md) untuk melihat dokumentasi*/
63
+
51
64
  export default function m(props: UserIndexProps): any {
52
65
  moment().locale(LibLocale.state().get())
53
66
  const [loading, setLoading] = useSafeState(true)
@@ -61,40 +74,51 @@ export default function m(props: UserIndexProps): any {
61
74
  LibVersion.check()
62
75
  }, [])
63
76
 
77
+
78
+ const screenHeight = Dimensions.get('screen').height;
79
+ const windowHeight = Dimensions.get('window').height;
80
+ const statusBarHeight = StatusBar.currentHeight ?? 0;
81
+ const navigationBarHeight = screenHeight - windowHeight - statusBarHeight;
82
+
64
83
  useLayoutEffect(() => {
65
84
  if (fontLoaded) {
66
85
  UserClass.isLogin(() => {
67
86
  setLoading(false)
68
87
  })
88
+ SplashScreen.hideAsync()
69
89
  }
70
90
  }, [fontLoaded])
71
91
 
72
92
 
73
93
  //esoftplay-chatting
74
94
 
95
+ const Main = Platform.OS == 'ios' ? View : SafeAreaView
96
+
75
97
  return (
76
- <KeyboardProvider>
77
- <GestureHandlerRootView style={{ flex: 1 }}>
78
- <View style={{ flex: 1 }}>
79
- <LibWorker />
80
- {
81
- loading ?
82
- <UserLoading />
83
- :
84
- <>
85
- <LibWorkloop />
86
- <Navs />
87
- <LibNet_status />
88
- <LibDialog style={'default'} />
89
- <LibImage />
90
- <LibProgress />
91
- <LibToast />
92
- <UserHook />
93
- </>
94
- }
95
- </View>
96
- <View style={{ backgroundColor: LibStyle?.colorNavigationBar || 'white', height: LibStyle.isIphoneX ? 35 : 0 }} />
97
- </GestureHandlerRootView>
98
- </KeyboardProvider>
98
+ <Main style={{ flex: 1 }} >
99
+ <KeyboardProvider >
100
+ <GestureHandlerRootView>
101
+ <View style={{ flex: 1 }}>
102
+ <LibWorker />
103
+ {
104
+ loading ?
105
+ <UserLoading />
106
+ :
107
+ <>
108
+ <LibWorkloop />
109
+ <Navs />
110
+ <LibNet_status />
111
+ <LibDialog style={'default'} />
112
+ <LibImage />
113
+ <LibProgress />
114
+ <LibToast />
115
+ <UserHook />
116
+ </>
117
+ }
118
+ </View>
119
+ <View style={{ backgroundColor: LibStyle?.colorNavigationBar || Platform.OS == 'android' ? '#ddd' : 'white', height: LibStyle.isIphoneX ? 35 : navigationBarHeight }} />
120
+ </GestureHandlerRootView>
121
+ </KeyboardProvider>
122
+ </Main>
99
123
  )
100
124
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esoftplay",
3
- "version": "0.0.191",
3
+ "version": "0.0.192",
4
4
  "description": "embedding data from esoftplay framework (web based) into mobile app",
5
5
  "main": "cache/index.js",
6
6
  "types": "../../index.d.ts",