@applicaster/zapp-react-native-utils 16.0.0-rc.2 → 16.0.0-rc.3

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.
@@ -1,14 +1,11 @@
1
1
  import * as R from "ramda";
2
2
 
3
3
  import { subscriber } from "@applicaster/zapp-react-native-utils/functionUtils";
4
- import {
5
- QUICK_BRICK_EVENTS,
6
- sendQuickBrickEvent,
7
- } from "@applicaster/zapp-react-native-bridge/QuickBrick";
8
-
9
4
  import { Hook } from "./Hook";
10
5
  import { HOOKS_EVENTS, HOOKS_TYPE } from "./constants";
11
6
 
7
+ import { platformToBackground } from "../platform";
8
+
12
9
  import { hooksManagerLogger } from "./logger";
13
10
  import { HookManager, HookManagerArgs } from "./types";
14
11
  import {
@@ -351,10 +348,7 @@ export function HooksManager({
351
348
  }
352
349
  );
353
350
 
354
- // TODO: Add this logic to platformBack and rename platformBack to platformToBackground for all platforms
355
- sendQuickBrickEvent(QUICK_BRICK_EVENTS.MOVE_APP_TO_BACKGROUND, {
356
- MOVE_APP_TO_BACKGROUND: true,
357
- });
351
+ platformToBackground();
358
352
  }
359
353
  } else {
360
354
  logHookEvent(
@@ -1,6 +1,11 @@
1
1
  import { BehaviorSubject } from "rxjs";
2
2
 
3
3
  import { sessionStorage } from "@applicaster/zapp-react-native-bridge/ZappStorage/SessionStorage";
4
+ import {
5
+ QUICK_BRICK_EVENTS,
6
+ sendQuickBrickEvent,
7
+ } from "@applicaster/zapp-react-native-bridge/QuickBrick";
8
+
4
9
  import {
5
10
  isLgPlatform,
6
11
  isSamsungPlatform,
@@ -18,6 +23,12 @@ const { log_debug } = createLogger({
18
23
  parent: utilsLogger,
19
24
  });
20
25
 
26
+ export const platformToBackground = () => {
27
+ sendQuickBrickEvent(QUICK_BRICK_EVENTS.MOVE_APP_TO_BACKGROUND, {
28
+ MOVE_APP_TO_BACKGROUND: true,
29
+ });
30
+ };
31
+
21
32
  export const getZappPlatform = (): ZappPlatform => {
22
33
  const platform = appStore.get("appData")?.platform;
23
34
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-utils",
3
- "version": "16.0.0-rc.2",
3
+ "version": "16.0.0-rc.3",
4
4
  "description": "Applicaster Zapp React Native utilities package",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "homepage": "https://github.com/applicaster/quickbrick#readme",
29
29
  "dependencies": {
30
- "@applicaster/applicaster-types": "16.0.0-rc.2",
30
+ "@applicaster/applicaster-types": "16.0.0-rc.3",
31
31
  "buffer": "^5.2.1",
32
32
  "camelize": "^1.0.0",
33
33
  "dayjs": "^1.11.10",