esoftplay 0.0.115-d → 0.0.115-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.
@@ -40,21 +40,19 @@ export default class m extends LibComponent<LibVersionProps, LibVersionState> {
40
40
 
41
41
  static onDone(res: any, msg: string): void {
42
42
  const { title, version, android, ios } = res
43
- console.log(res)
44
43
  function isAvailableNewVersion(newVersion: string): boolean {
45
44
  let oldVersion = m.appVersion()
46
45
  return newVersion > oldVersion
47
46
  }
48
47
 
49
48
  if (isAvailableNewVersion(version)) {
50
- console.log("IS AVAILABLE", version)
51
49
  LibNavigation.backToRoot()
52
50
  LibNavigation.replace("lib/version", { res, msg: msg == 'success' ? 'Update to a new version now' : msg })
53
51
  }
54
52
 
55
53
  }
56
54
  static check(): void {
57
- new LibCurl("public_version?syafiq=1", null, m.onDone)
55
+ new LibCurl("public_version", null, m.onDone)
58
56
  }
59
57
 
60
58
  render(): any {
@@ -4,7 +4,7 @@
4
4
  import { ChattingFirebase, esp, LibDialog, LibImage, LibNet_status, LibProgress, LibStyle, LibToast, LibUpdaterProperty, LibVersion, LibWorker, LibWorkloop, LibWorkview, UseDeeplink, useGlobalReturn, useGlobalState, UserClass, UserLoading, UserMain, UserRoutes, useSafeState, _global } from 'esoftplay';
5
5
  import * as Font from "expo-font";
6
6
  import React, { useEffect, useLayoutEffect } from "react";
7
- import { View } from "react-native";
7
+ import { Platform, View } from "react-native";
8
8
  import { GestureHandlerRootView } from 'react-native-gesture-handler';
9
9
  import Navs from "../../cache/navs";
10
10
 
@@ -56,24 +56,30 @@ export default function m(props: UserIndexProps): any {
56
56
  // const timeout = setTimeout(() => {
57
57
  // setLoading(false)
58
58
  // }, 15 * 1000);
59
+ let limitReady = 3
60
+ if (Platform.OS == 'android')
61
+ if (Platform.Version <= 22) {
62
+ limitReady = 2
63
+ }
64
+
59
65
  if (worker == 1 && !workerReady.current) {
60
66
  ready.current += 1
61
67
  workerReady.current = true
62
- if (ready.current >= 3) {
68
+ if (ready.current >= limitReady) {
63
69
  setLoading(false)
64
70
  }
65
71
  }
66
72
  (async () => {
67
73
  await setFonts()
68
74
  ready.current += 1
69
- if (ready.current >= 3) {
75
+ if (ready.current >= limitReady) {
70
76
  setLoading(false)
71
77
  }
72
78
  })()
73
79
 
74
80
  UserClass.isLogin(async () => {
75
81
  ready.current += 1
76
- if (ready.current >= 3) {
82
+ if (ready.current >= limitReady) {
77
83
  setLoading(false)
78
84
  }
79
85
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esoftplay",
3
- "version": "0.0.115-d",
3
+ "version": "0.0.115-g",
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",