@applicaster/zapp-react-native-utils 13.0.0-alpha.2330880002 → 13.0.0-alpha.3592223128
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.
|
@@ -169,12 +169,8 @@ export class PlayerManager {
|
|
|
169
169
|
this.addPlayer(id, playerController);
|
|
170
170
|
|
|
171
171
|
if (playerController.playerRole === PlayerRole.Primary) {
|
|
172
|
-
if (
|
|
173
|
-
|
|
174
|
-
if (pluginId !== playerController.playerPluginId) {
|
|
175
|
-
RNPlayerManager[pluginId].stopBackgroundPlayback?.();
|
|
176
|
-
}
|
|
177
|
-
});
|
|
172
|
+
if (playerController.playerPluginId !== "QuickBrickPlayerPlugin") {
|
|
173
|
+
RNPlayerManager?.["QuickBrickPlayerPlugin"]?.stopBackgroundPlayback?.();
|
|
178
174
|
}
|
|
179
175
|
|
|
180
176
|
playerController.addListener({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-utils",
|
|
3
|
-
"version": "13.0.0-alpha.
|
|
3
|
+
"version": "13.0.0-alpha.3592223128",
|
|
4
4
|
"description": "Applicaster Zapp React Native utilities package",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@applicaster/applicaster-types": "13.0.0-alpha.
|
|
31
|
+
"@applicaster/applicaster-types": "13.0.0-alpha.3592223128",
|
|
32
32
|
"buffer": "^5.2.1",
|
|
33
33
|
"camelize": "^1.0.0",
|
|
34
34
|
"create-react-context": "^0.2.3",
|
|
@@ -135,11 +135,7 @@ describe("useFeedLoader", () => {
|
|
|
135
135
|
);
|
|
136
136
|
|
|
137
137
|
expect(result.current.data).toBeNull();
|
|
138
|
-
|
|
139
|
-
expect(loadPipesDataSpy).toBeCalledWith(feedUrl, {
|
|
140
|
-
clearCache: true,
|
|
141
|
-
riverId: undefined,
|
|
142
|
-
});
|
|
138
|
+
expect(loadPipesDataSpy).toBeCalledWith(feedUrl, {});
|
|
143
139
|
|
|
144
140
|
const store2 = mockStore({
|
|
145
141
|
plugins: [],
|
|
@@ -176,11 +172,7 @@ describe("useFeedLoader", () => {
|
|
|
176
172
|
);
|
|
177
173
|
|
|
178
174
|
expect(result.current.data).toBeNull();
|
|
179
|
-
|
|
180
|
-
expect(loadPipesDataSpy).toBeCalledWith(feedUrl, {
|
|
181
|
-
clearCache: true,
|
|
182
|
-
riverId: undefined,
|
|
183
|
-
});
|
|
175
|
+
expect(loadPipesDataSpy).toBeCalledWith(feedUrl, {});
|
|
184
176
|
|
|
185
177
|
const store2 = mockStore({
|
|
186
178
|
plugins: [],
|
|
@@ -5,7 +5,7 @@ import { loadPipesData } from "@applicaster/zapp-react-native-redux/ZappPipes";
|
|
|
5
5
|
import { useZappPipesFeed } from "@applicaster/zapp-react-native-redux/hooks";
|
|
6
6
|
|
|
7
7
|
import { reactHooksLogger } from "../logger";
|
|
8
|
-
import { useIsInitialRender,
|
|
8
|
+
import { useIsInitialRender, shouldUseCachedData } from "../utils";
|
|
9
9
|
import { useInflatedUrl } from "./useInflatedUrl";
|
|
10
10
|
import { useRoute } from "../navigation";
|
|
11
11
|
|
|
@@ -89,18 +89,13 @@ export const useFeedLoader = ({
|
|
|
89
89
|
}
|
|
90
90
|
}, [callableFeedUrl, currentFeed?.data]);
|
|
91
91
|
|
|
92
|
+
// If feed doesn't exist, load it
|
|
92
93
|
useEffect(() => {
|
|
93
94
|
if (
|
|
94
|
-
|
|
95
|
+
shouldUseCachedData(callableFeedUrl, currentFeed, pipesOptions.clearCache)
|
|
95
96
|
) {
|
|
96
97
|
if (callableFeedUrl) {
|
|
97
|
-
dispatch(
|
|
98
|
-
loadPipesData(callableFeedUrl, {
|
|
99
|
-
...pipesOptions,
|
|
100
|
-
clearCache: true,
|
|
101
|
-
riverId,
|
|
102
|
-
})
|
|
103
|
-
);
|
|
98
|
+
dispatch(loadPipesData(callableFeedUrl, { ...pipesOptions, riverId }));
|
|
104
99
|
} else {
|
|
105
100
|
logger.info({
|
|
106
101
|
message:
|
|
@@ -33,7 +33,7 @@ export const useIsInitialRender = (): boolean => {
|
|
|
33
33
|
|
|
34
34
|
export const checkIsLocalFeed = (feedUrl) => feedUrl?.startsWith("pipesv2://");
|
|
35
35
|
|
|
36
|
-
export const
|
|
36
|
+
export const shouldUseCachedData = (
|
|
37
37
|
url: string,
|
|
38
38
|
feed: ZappPipesData | null,
|
|
39
39
|
clearCache: boolean
|