esoftplay 0.0.129-c → 0.0.129-e
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/mover.js
CHANGED
|
@@ -74,6 +74,8 @@ if (fs.existsSync("../" + mainModule + "/id.json")) {
|
|
|
74
74
|
moduleLang = { ..._lg }
|
|
75
75
|
}
|
|
76
76
|
fs.writeFileSync("../../assets/locale/id.json", JSON.stringify(moduleLang, undefined, 2))
|
|
77
|
+
/* sort id.JSON */
|
|
78
|
+
shell("cd ../../ && node ./node_modules/esoftplay/bin/locale.js")
|
|
77
79
|
}
|
|
78
80
|
|
|
79
81
|
/* inject libs */
|
|
@@ -103,4 +105,4 @@ if (fs.existsSync("../" + mainModule + "/libs.json")) {
|
|
|
103
105
|
/* execute mover on master */
|
|
104
106
|
if (fs.existsSync("../" + mainModule + "/mover.js")) {
|
|
105
107
|
shell("node ../" + mainModule + "/mover.js", { stdio: 'inherit' })
|
|
106
|
-
}
|
|
108
|
+
}
|
package/modules/lib/locale.ts
CHANGED
|
@@ -6,8 +6,8 @@ import useGlobalState from 'esoftplay/global';
|
|
|
6
6
|
import { NativeModules, Platform } from 'react-native';
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
const state = useGlobalState("id", { persistKey: 'lib_locale_lang' })
|
|
10
|
-
const lang = useGlobalState({}, { persistKey: 'lib_locale_lang_data', inFile: true })
|
|
9
|
+
const state = useGlobalState("id", { persistKey: 'lib_locale_lang', loadOnInit: true })
|
|
10
|
+
const lang = useGlobalState({}, { persistKey: 'lib_locale_lang_data', inFile: true, loadOnInit: true })
|
|
11
11
|
|
|
12
12
|
export default class m {
|
|
13
13
|
|
package/modules/lib/utils.ts
CHANGED
|
@@ -19,7 +19,7 @@ export interface LibUtilsDate {
|
|
|
19
19
|
|
|
20
20
|
export type LibUtilsTravelMode = 'driving' | 'walking'
|
|
21
21
|
let installationIdDefault
|
|
22
|
-
const installationId = useGlobalState(installationIdDefault, { persistKey: 'deviceId' })
|
|
22
|
+
const installationId = useGlobalState(installationIdDefault, { persistKey: 'deviceId', loadOnInit: true })
|
|
23
23
|
const cache = useGlobalState<any>({ inDebounce: undefined })
|
|
24
24
|
export default class eutils {
|
|
25
25
|
|
package/modules/user/class.ts
CHANGED
|
@@ -12,7 +12,7 @@ import Constants from 'expo-constants';
|
|
|
12
12
|
import * as Notifications from 'expo-notifications';
|
|
13
13
|
import { Platform } from 'react-native';
|
|
14
14
|
|
|
15
|
-
const state = useGlobalState(null, { persistKey: "user" })
|
|
15
|
+
const state = useGlobalState(null, { persistKey: "user", loadOnInit: true })
|
|
16
16
|
|
|
17
17
|
export default class m {
|
|
18
18
|
static state(): useGlobalReturn<any> {
|
package/modules/user/index.tsx
CHANGED
|
@@ -53,7 +53,7 @@ function setFonts(): Promise<void> {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
const route = useGlobalState<any>(undefined, { persistKey: 'user_index_routes_initial', inFile: true })
|
|
56
|
+
const route = useGlobalState<any>(undefined, { persistKey: 'user_index_routes_initial', inFile: true, loadOnInit: true })
|
|
57
57
|
export default function m(props: UserIndexProps): any {
|
|
58
58
|
const [langId] = LibLocale.state().useState()
|
|
59
59
|
moment().locale(langId)
|
|
@@ -28,7 +28,7 @@ const initState = {
|
|
|
28
28
|
unread: 0
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
const state = useGlobalState<any>(initState, { persistKey: "user_notification_data", isUserData: true })
|
|
31
|
+
const state = useGlobalState<any>(initState, { persistKey: "user_notification_data", isUserData: true, loadOnInit: true })
|
|
32
32
|
class m extends LibComponent<UserNotificationProps, UserNotificationState> {
|
|
33
33
|
|
|
34
34
|
static state(): useGlobalReturn<any> {
|