esoftplay 0.0.127-u → 0.0.127-v

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.
@@ -3,7 +3,6 @@ import NetInfo from '@react-native-community/netinfo';
3
3
  import { useGlobalReturn } from 'esoftplay';
4
4
  import { LibComponent } from 'esoftplay/cache/lib/component/import';
5
5
  import useGlobalState from 'esoftplay/global';
6
- import React from "react";
7
6
  import { Animated, Text } from "react-native";
8
7
 
9
8
  export interface LibNet_statusProps {
@@ -36,7 +35,7 @@ class net_status extends LibComponent<LibNet_statusProps, LibNet_statusState> {
36
35
  componentDidMount(): void {
37
36
  super.componentDidMount()
38
37
  this.unsubscribe = NetInfo.addEventListener(state => {
39
- this.onChangeConnectivityStatus(state.isConnected)
38
+ this.onChangeConnectivityStatus(state.isConnected, state.isInternetReachable)
40
39
  });
41
40
  }
42
41
 
@@ -45,9 +44,11 @@ class net_status extends LibComponent<LibNet_statusProps, LibNet_statusState> {
45
44
  this.unsubscribe()
46
45
  }
47
46
 
48
- onChangeConnectivityStatus(isConnected: boolean): void {
49
- net_status.setOnline(isConnected)
50
- if (isConnected) {
47
+ onChangeConnectivityStatus(isConnected: boolean, isInternetReachable): void {
48
+ let isOnline = (isConnected == true && isInternetReachable == true) ? true : false
49
+ net_status.setOnline(isOnline)
50
+ console.log(isOnline, "isOnline")
51
+ if (isOnline) {
51
52
  this.timeout = setTimeout(() => {
52
53
  this.setState({ zeroHeight: 1 })
53
54
  }, 1500)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esoftplay",
3
- "version": "0.0.127-u",
3
+ "version": "0.0.127-v",
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",