esoftplay 0.0.193 → 0.0.194
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/bin/build.js +8 -1
- package/modules/user/index.tsx +15 -7
- package/package.json +1 -1
package/bin/build.js
CHANGED
|
@@ -288,6 +288,7 @@ yarn-error.log
|
|
|
288
288
|
const AppJS = `import { LibNotification } from 'esoftplay/cache/lib/notification/import';
|
|
289
289
|
import { UserIndex } from 'esoftplay/cache/user/index/import';
|
|
290
290
|
import * as Notifications from 'expo-notifications';
|
|
291
|
+
import { SafeAreaProvider } from 'react-native-safe-area-context';
|
|
291
292
|
import { enableFreeze, enableScreens } from 'react-native-screens';
|
|
292
293
|
|
|
293
294
|
enableFreeze()
|
|
@@ -296,7 +297,13 @@ enableScreens()
|
|
|
296
297
|
Notifications.addNotificationResponseReceivedListener(x => LibNotification.onAction(x));
|
|
297
298
|
Notifications.addNotificationReceivedListener(x => LibNotification.onAction(x));
|
|
298
299
|
|
|
299
|
-
export default
|
|
300
|
+
export default function App() {
|
|
301
|
+
return (
|
|
302
|
+
<SafeAreaProvider>
|
|
303
|
+
<UserIndex />
|
|
304
|
+
</SafeAreaProvider>
|
|
305
|
+
)
|
|
306
|
+
}`;
|
|
300
307
|
let expoLib = [
|
|
301
308
|
'@expo/vector-icons',
|
|
302
309
|
'@react-native-async-storage/async-storage',
|
package/modules/user/index.tsx
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
//[moved] add effect lib/notification
|
|
1
2
|
// withHooks
|
|
2
3
|
// noPage
|
|
3
4
|
import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
|
|
4
5
|
import { LibImage } from 'esoftplay/cache/lib/image/import';
|
|
5
6
|
import { LibLocale } from 'esoftplay/cache/lib/locale/import';
|
|
6
7
|
import { LibNet_status } from 'esoftplay/cache/lib/net_status/import';
|
|
8
|
+
import { LibNotification } from 'esoftplay/cache/lib/notification/import';
|
|
7
9
|
import { LibProgress } from 'esoftplay/cache/lib/progress/import';
|
|
8
10
|
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
9
11
|
import { LibToast } from 'esoftplay/cache/lib/toast/import';
|
|
@@ -22,10 +24,11 @@ import moment from 'esoftplay/moment';
|
|
|
22
24
|
import useSafeState from 'esoftplay/state';
|
|
23
25
|
import { useFonts } from 'expo-font';
|
|
24
26
|
import * as SplashScreen from 'expo-splash-screen';
|
|
25
|
-
import { useLayoutEffect } from 'react';
|
|
26
|
-
import {
|
|
27
|
+
import { useEffect, useLayoutEffect } from 'react';
|
|
28
|
+
import { Platform, SafeAreaView, View } from 'react-native';
|
|
27
29
|
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
|
28
30
|
import { KeyboardProvider } from "react-native-keyboard-controller";
|
|
31
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
29
32
|
|
|
30
33
|
|
|
31
34
|
import {
|
|
@@ -59,8 +62,12 @@ function getFontConfig() {
|
|
|
59
62
|
|
|
60
63
|
SplashScreen.preventAutoHideAsync();
|
|
61
64
|
|
|
65
|
+
// (async () => {
|
|
66
|
+
// await NavigationBar.setPositionAsync('relative');
|
|
67
|
+
// await NavigationBar.setBackgroundColorAsync('#ffffff');
|
|
68
|
+
// await NavigationBar.setButtonStyleAsync("light")
|
|
69
|
+
// })()
|
|
62
70
|
/** Klik [disini](https://github.com/dev-esoftplay/mobile-docs/blob/main/modules/user/index.md) untuk melihat dokumentasi*/
|
|
63
|
-
|
|
64
71
|
export default function m(props: UserIndexProps): any {
|
|
65
72
|
moment().locale(LibLocale.state().get())
|
|
66
73
|
const [loading, setLoading] = useSafeState(true)
|
|
@@ -68,6 +75,9 @@ export default function m(props: UserIndexProps): any {
|
|
|
68
75
|
//esoftplay-user-class-hook
|
|
69
76
|
UseDeeplink()
|
|
70
77
|
|
|
78
|
+
|
|
79
|
+
useEffect(LibNotification.effect, []) // add this
|
|
80
|
+
|
|
71
81
|
useLayoutEffect(() => {
|
|
72
82
|
ErrorReport.getError()
|
|
73
83
|
LibUpdaterProperty.check()
|
|
@@ -75,10 +85,8 @@ export default function m(props: UserIndexProps): any {
|
|
|
75
85
|
}, [])
|
|
76
86
|
|
|
77
87
|
|
|
78
|
-
const
|
|
79
|
-
const
|
|
80
|
-
const statusBarHeight = StatusBar.currentHeight ?? 0;
|
|
81
|
-
const navigationBarHeight = screenHeight - windowHeight - statusBarHeight;
|
|
88
|
+
const insets = useSafeAreaInsets();
|
|
89
|
+
const navigationBarHeight = insets.bottom;
|
|
82
90
|
|
|
83
91
|
useLayoutEffect(() => {
|
|
84
92
|
if (fontLoaded) {
|