@applicaster/quick-brick-core 12.0.0-alpha.5040434238 → 12.0.0-alpha.5061452310

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.
@@ -5,6 +5,7 @@ import { NetInfoState } from "@react-native-community/netinfo";
5
5
  import { NETWORK_HOOKS_KEYS } from "./const";
6
6
  import { platformSelect } from "@applicaster/zapp-react-native-utils/reactUtils";
7
7
  import { Platform } from "react-native";
8
+ import { hasVizioAPIs } from "@applicaster/zapp-react-dom-app/App/Loader/utils/platform";
8
9
 
9
10
  type ConnectionStatus = boolean;
10
11
  type NetInfoNotReady = null;
@@ -203,6 +204,18 @@ export const subscribeToDeviceNetworkChanges = (callback: NetCb) => {
203
204
  registeredListener = webapis.network.addNetworkStateChangeListener(
204
205
  samsungNetworkChangeHandler(callback)
205
206
  );
207
+
208
+ return;
209
+ }
210
+
211
+ if (hasVizioAPIs()) {
212
+ window.addEventListener("online", function () {
213
+ callback({ online: true });
214
+ });
215
+
216
+ window.addEventListener("offline", function () {
217
+ callback({ online: false });
218
+ });
206
219
  }
207
220
  };
208
221
 
@@ -214,5 +227,12 @@ export const subscribeToDeviceNetworkChanges = (callback: NetCb) => {
214
227
  export const unsubscribeToDeviceNetworkChanges = (id = registeredListener) => {
215
228
  if (hasTizenAPIs()) {
216
229
  webapis.network.removeNetworkStateChangeListener(id);
230
+
231
+ return;
232
+ }
233
+
234
+ if (hasVizioAPIs()) {
235
+ window.removeEventListener("online", function () {});
236
+ window.removeEventListener("offline", function () {});
217
237
  }
218
238
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/quick-brick-core",
3
- "version": "12.0.0-alpha.5040434238",
3
+ "version": "12.0.0-alpha.5061452310",
4
4
  "description": "Core package for Applicaster's Quick Brick App",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -30,13 +30,13 @@
30
30
  },
31
31
  "homepage": "https://github.com/applicaster/quickbrick#readme",
32
32
  "dependencies": {
33
- "@applicaster/applicaster-types": "12.0.0-alpha.5040434238",
34
- "@applicaster/quick-brick-core-plugins": "12.0.0-alpha.5040434238",
35
- "@applicaster/zapp-pipes-v2-client": "12.0.0-alpha.5040434238",
36
- "@applicaster/zapp-react-native-bridge": "12.0.0-alpha.5040434238",
37
- "@applicaster/zapp-react-native-redux": "12.0.0-alpha.5040434238",
38
- "@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.5040434238",
39
- "@applicaster/zapp-react-native-utils": "12.0.0-alpha.5040434238",
33
+ "@applicaster/applicaster-types": "12.0.0-alpha.5061452310",
34
+ "@applicaster/quick-brick-core-plugins": "12.0.0-alpha.5061452310",
35
+ "@applicaster/zapp-pipes-v2-client": "12.0.0-alpha.5061452310",
36
+ "@applicaster/zapp-react-native-bridge": "12.0.0-alpha.5061452310",
37
+ "@applicaster/zapp-react-native-redux": "12.0.0-alpha.5061452310",
38
+ "@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.5061452310",
39
+ "@applicaster/zapp-react-native-utils": "12.0.0-alpha.5061452310",
40
40
  "atob": "^2.1.2",
41
41
  "axios": "^0.28.0",
42
42
  "btoa": "^1.2.1",