esoftplay 0.0.116-c → 0.0.116-d

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.
@@ -40,7 +40,6 @@ function isWorkerReady(onReady: () => void): void {
40
40
 
41
41
  export default function UserIndex(props: UserIndexProps): any {
42
42
  const [loading, setLoading] = useSafeState(true)
43
- const [worker, setWorker] = useSafeState(0)
44
43
  const user = UserClass.state().useSelector(s => s)
45
44
  const ready = React.useRef(0)
46
45
  UseDeeplink()
@@ -64,18 +63,15 @@ export default function UserIndex(props: UserIndexProps): any {
64
63
  if (Platform.Version <= 22) {
65
64
  limitReady = 2
66
65
  }
66
+
67
67
  if (limitReady == 3) {
68
68
  isWorkerReady(() => {
69
- setWorker(1)
69
+ ready.current += 1
70
+ if (ready.current >= limitReady) {
71
+ setLoading(false)
72
+ }
70
73
  })
71
74
  }
72
-
73
- if (worker == 1) {
74
- ready.current += 1
75
- if (ready.current >= limitReady) {
76
- setLoading(false)
77
- }
78
- }
79
75
  (async () => {
80
76
  await setFonts()
81
77
  ready.current += 1
@@ -99,7 +95,7 @@ export default function UserIndex(props: UserIndexProps): any {
99
95
  }
100
96
  }
101
97
  LibUpdaterProperty.check((isNew) => { })
102
- }, [worker])
98
+ }, [])
103
99
 
104
100
  useEffect(() => {
105
101
  if (!loading) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esoftplay",
3
- "version": "0.0.116-c",
3
+ "version": "0.0.116-d",
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",