esoftplay 0.0.113-e → 0.0.113-h
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/error.ts +9 -5
- package/modules/user/index.tsx +19 -8
- package/package.json +1 -1
package/error.ts
CHANGED
|
@@ -78,12 +78,16 @@ export function getError() {
|
|
|
78
78
|
'error: \n' + _e.error,
|
|
79
79
|
].join('\n')
|
|
80
80
|
// config?.errorReport?.telegramIds?.forEach?.((id: string) => {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
if (msg.includes(`Invariant Violation: "main" has not been registered. This can happen if`)) {
|
|
82
|
+
// remove error that unsolved
|
|
83
|
+
} else {
|
|
84
|
+
let post = {
|
|
85
|
+
text: msg,
|
|
86
|
+
chat_id: "-1001212227631",
|
|
87
|
+
disable_web_page_preview: true
|
|
88
|
+
}
|
|
89
|
+
new LibCurl().custom('https://api.telegram.org/bot923808407:AAEFBlllQNKCEn8E66fwEzCj5vs9qGwVGT4/sendMessage', post)
|
|
85
90
|
}
|
|
86
|
-
new LibCurl().custom('https://api.telegram.org/bot923808407:AAEFBlllQNKCEn8E66fwEzCj5vs9qGwVGT4/sendMessage', post)
|
|
87
91
|
// });
|
|
88
92
|
AsyncStorage.removeItem(config.domain + 'error')
|
|
89
93
|
}
|
package/modules/user/index.tsx
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { esp, LibDialog, LibImage, LibNet_status, LibProgress, LibStyle, LibToast, LibUpdaterProperty, LibVersion, LibWorker, LibWorkloop, LibWorkview, UseDeeplink, UserClass, UserLoading, UserMain, UserRoutes, useSafeState, _global } from 'esoftplay';
|
|
5
5
|
import * as Font from "expo-font";
|
|
6
|
-
import React, { useEffect
|
|
6
|
+
import React, { useEffect } from "react";
|
|
7
7
|
import { View } from "react-native";
|
|
8
8
|
import Navs from "../../cache/navs";
|
|
9
9
|
|
|
@@ -30,9 +30,11 @@ function setFonts(): Promise<void> {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
|
|
33
|
+
|
|
33
34
|
export default function m(props: UserIndexProps): any {
|
|
34
35
|
const [loading, setLoading] = useSafeState(true)
|
|
35
36
|
const user = UserClass.state().useSelector(s => s)
|
|
37
|
+
const ready = React.useRef(0)
|
|
36
38
|
UseDeeplink()
|
|
37
39
|
//@ts-ignore
|
|
38
40
|
const initialState = __DEV__ ? _global.nav__state : undefined
|
|
@@ -45,10 +47,25 @@ export default function m(props: UserIndexProps): any {
|
|
|
45
47
|
UserRoutes.set(currentState)
|
|
46
48
|
}
|
|
47
49
|
|
|
48
|
-
|
|
50
|
+
useEffect(() => {
|
|
49
51
|
// const timeout = setTimeout(() => {
|
|
50
52
|
// setLoading(false)
|
|
51
53
|
// }, 15 * 1000);
|
|
54
|
+
(async () => {
|
|
55
|
+
await setFonts()
|
|
56
|
+
ready.current += 1
|
|
57
|
+
if (ready.current === 2) {
|
|
58
|
+
setLoading(false)
|
|
59
|
+
}
|
|
60
|
+
})()
|
|
61
|
+
|
|
62
|
+
UserClass.isLogin(async () => {
|
|
63
|
+
ready.current += 1
|
|
64
|
+
if (ready.current === 2) {
|
|
65
|
+
setLoading(false)
|
|
66
|
+
}
|
|
67
|
+
LibUpdaterProperty.check((isNew) => { })
|
|
68
|
+
})
|
|
52
69
|
if (esp.config('firebase').hasOwnProperty('apiKey')) {
|
|
53
70
|
try {
|
|
54
71
|
const chatFirebase = require('../chatting/firebase')?.default
|
|
@@ -58,12 +75,6 @@ export default function m(props: UserIndexProps): any {
|
|
|
58
75
|
|
|
59
76
|
}
|
|
60
77
|
}
|
|
61
|
-
UserClass.isLogin(async () => {
|
|
62
|
-
await setFonts()
|
|
63
|
-
LibUpdaterProperty.check((isNew) => { })
|
|
64
|
-
// clearTimeout(timeout)
|
|
65
|
-
setLoading(false)
|
|
66
|
-
})
|
|
67
78
|
}, [])
|
|
68
79
|
|
|
69
80
|
useEffect(() => {
|