esoftplay 0.0.130-e → 0.0.130-g
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/modules/lib/worker.ts +39 -0
- package/modules/use/deeplink.ts +4 -4
- package/modules/user/index.tsx +1 -12
- package/package.json +1 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// useLibs
|
|
2
|
+
|
|
3
|
+
import { runOnJS, runOnUI } from "react-native-reanimated";
|
|
4
|
+
|
|
5
|
+
export interface LibWorkerProps {
|
|
6
|
+
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
const run = LibWorker((arg: any[], cb: (out: any) => void) => {
|
|
11
|
+
"worklet";
|
|
12
|
+
let out = 0
|
|
13
|
+
for (let i = 0; i < arg[0]; i++) {
|
|
14
|
+
out += i
|
|
15
|
+
}
|
|
16
|
+
cb(out)
|
|
17
|
+
})
|
|
18
|
+
run([99999999], res => {
|
|
19
|
+
setState(res)
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
export default function m(func: any): (args: any[], cb: (res: any) => void) => void {
|
|
25
|
+
|
|
26
|
+
return (args: any[], cb: (res: any) => void) => {
|
|
27
|
+
function callback(out: any) {
|
|
28
|
+
"worklet"
|
|
29
|
+
runOnJS(cb)(out)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function run() {
|
|
33
|
+
"worklet"
|
|
34
|
+
func(args, callback)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
runOnUI(run)()
|
|
38
|
+
}
|
|
39
|
+
}
|
package/modules/use/deeplink.ts
CHANGED
|
@@ -16,11 +16,11 @@ export default function m(defaultUrl?: string): void {
|
|
|
16
16
|
url = url.replace((domain + uri), (domain + uri + 'deeplink/'))
|
|
17
17
|
url = url.replace(/^[a-z]+\:\/\//g, protocol + "://")
|
|
18
18
|
function removeLastDot(url: string) {
|
|
19
|
-
if (url.
|
|
20
|
-
url = url.
|
|
21
|
-
return removeLastDot(url)
|
|
19
|
+
if (url.endsWith('.')) {
|
|
20
|
+
url = url.slice(0, -1);
|
|
21
|
+
return removeLastDot(url);
|
|
22
22
|
}
|
|
23
|
-
return url
|
|
23
|
+
return url;
|
|
24
24
|
}
|
|
25
25
|
new LibCurl().custom(removeLastDot(url), null,
|
|
26
26
|
(res) => {
|
package/modules/user/index.tsx
CHANGED
|
@@ -97,20 +97,9 @@ export default function m(props: UserIndexProps): any {
|
|
|
97
97
|
}
|
|
98
98
|
})
|
|
99
99
|
|
|
100
|
-
if (esp.config('firebase').hasOwnProperty('apiKey')) {
|
|
101
|
-
try {
|
|
102
|
-
const Firestore = esp.mod('chatting/firestore')
|
|
103
|
-
Firestore()?.init?.()
|
|
104
|
-
if (user) {
|
|
105
|
-
const ChattingLib = esp.mod('chatting/lib')
|
|
106
|
-
ChattingLib().setUser()
|
|
107
|
-
}
|
|
108
|
-
} catch (error) {
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
100
|
LibUpdaterProperty.check()
|
|
113
101
|
}, [])
|
|
102
|
+
//esoftplay-chatting
|
|
114
103
|
|
|
115
104
|
useEffect(() => {
|
|
116
105
|
if (!loading) {
|