@applicaster/zapp-react-native-ui-components 16.0.0-rc.114 → 16.0.0-rc.116

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.
@@ -7,7 +7,7 @@ import { Artwork } from "./Artwork";
7
7
  import { directionStyles } from "./helpers";
8
8
 
9
9
  type Props = {
10
- artwork: Option<string>;
10
+ artwork: string;
11
11
  config: {
12
12
  titleColor: string;
13
13
  summaryColor: string;
@@ -152,7 +152,7 @@ export function AudioPlayerTVLayout({
152
152
  resizeMode="cover"
153
153
  >
154
154
  <View style={[mainContainerStyles, backgroundOverlayStyles]}>
155
- {artwork ? <Artwork srcImage={artwork} config={config} /> : null}
155
+ <Artwork srcImage={artwork} config={config} />
156
156
  <View style={textContainerStyles}>{children}</View>
157
157
  </View>
158
158
  </ImageBackground>
@@ -161,7 +161,7 @@ export function AudioPlayerTVLayout({
161
161
 
162
162
  return (
163
163
  <View style={mainContainerStyles}>
164
- {artwork ? <Artwork srcImage={artwork} config={config} /> : null}
164
+ <Artwork srcImage={artwork} config={config} />
165
165
  <View style={textContainerStyles}>{children}</View>
166
166
  </View>
167
167
  );
@@ -245,10 +245,19 @@ const LiveImageComponent = (props: LiveImageProps) => {
245
245
 
246
246
  const isCurrentlyFocused = useTrackCurrentAutoScrollingElement(componentId);
247
247
 
248
- const { playerPluginId, screenConfig, preloadHooks } =
249
- getPlayerConfig(player_screen_id, actionIdentifier) ?? {};
248
+ // New object identities here restart PlayerLiveImage's register effect,
249
+ // which throws away the in-flight player and runs preload hooks again.
250
+ const playerConfig = React.useMemo(
251
+ () => getPlayerConfig(player_screen_id, actionIdentifier),
252
+ [player_screen_id, actionIdentifier]
253
+ );
254
+
255
+ const { playerPluginId, screenConfig, preloadHooks } = playerConfig ?? {};
250
256
 
251
- const playableEntry = playerPluginId ? getPlayableEntry(item) : null;
257
+ const playableEntry = React.useMemo(
258
+ () => (playerPluginId ? getPlayableEntry(item) : null),
259
+ [playerPluginId, item?.id]
260
+ );
252
261
 
253
262
  const playerPlugin = getPluginByIdentifier(playerPluginId);
254
263
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-ui-components",
3
- "version": "16.0.0-rc.114",
3
+ "version": "16.0.0-rc.116",
4
4
  "description": "Applicaster Zapp React Native ui components for the Quick Brick App",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -28,10 +28,10 @@
28
28
  },
29
29
  "homepage": "https://github.com/applicaster/quickbrick#readme",
30
30
  "dependencies": {
31
- "@applicaster/applicaster-types": "16.0.0-rc.114",
32
- "@applicaster/zapp-react-native-bridge": "16.0.0-rc.114",
33
- "@applicaster/zapp-react-native-redux": "16.0.0-rc.114",
34
- "@applicaster/zapp-react-native-utils": "16.0.0-rc.114",
31
+ "@applicaster/applicaster-types": "16.0.0-rc.116",
32
+ "@applicaster/zapp-react-native-bridge": "16.0.0-rc.116",
33
+ "@applicaster/zapp-react-native-redux": "16.0.0-rc.116",
34
+ "@applicaster/zapp-react-native-utils": "16.0.0-rc.116",
35
35
  "fast-json-stable-stringify": "^2.1.0",
36
36
  "promise": "^8.3.0",
37
37
  "react-native-sortables": "1.7.1",