@react-native-ohos/lottie-react-native 7.2.4-rc.1 → 7.2.4

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.
package/README.md CHANGED
@@ -4,9 +4,9 @@ This project is based on [lottie-react-native v7.2.2](https://github.com/lottie-
4
4
 
5
5
  ## Documentation
6
6
 
7
- - [中文](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/lottie-react-native.md)
7
+ - [中文](https://gitcode.com/OpenHarmony-RN/usage-docs/blob/master/zh-cn/lottie-react-native.md)
8
8
 
9
- - [English](https://gitee.com/react-native-oh-library/usage-docs/blob/master/en/lottie-react-native.md)
9
+ - [English](https://gitcode.com/OpenHarmony-RN/usage-docs/blob/master/en/lottie-react-native.md)
10
10
 
11
11
  ## License
12
12
 
@@ -1,21 +1,17 @@
1
- // Copyright (c) 2025 Huawei Device Co., Ltd. All rights reserved
2
- // Use of this source code is governed by a Apache-2.0 license that can be
3
- // found in the LICENSE file.
4
-
5
- /**
6
- * Use these variables when you tailor your ArkTS code. They must be of the const type.
7
- */
8
- export const HAR_VERSION = '7.2.3';
9
- export const BUILD_MODE_NAME = 'debug';
10
- export const DEBUG = true;
11
- export const TARGET_NAME = 'default';
12
-
13
- /**
14
- * BuildProfile Class is used only for compatibility purposes.
15
- */
16
- export default class BuildProfile {
17
- static readonly HAR_VERSION = HAR_VERSION;
18
- static readonly BUILD_MODE_NAME = BUILD_MODE_NAME;
19
- static readonly DEBUG = DEBUG;
20
- static readonly TARGET_NAME = TARGET_NAME;
1
+ /**
2
+ * Use these variables when you tailor your ArkTS code. They must be of the const type.
3
+ */
4
+ export const HAR_VERSION = '7.2.4';
5
+ export const BUILD_MODE_NAME = 'debug';
6
+ export const DEBUG = true;
7
+ export const TARGET_NAME = 'default';
8
+
9
+ /**
10
+ * BuildProfile Class is used only for compatibility purposes.
11
+ */
12
+ export default class BuildProfile {
13
+ static readonly HAR_VERSION = HAR_VERSION;
14
+ static readonly BUILD_MODE_NAME = BUILD_MODE_NAME;
15
+ static readonly DEBUG = DEBUG;
16
+ static readonly TARGET_NAME = TARGET_NAME;
21
17
  }
@@ -6,7 +6,7 @@
6
6
  "name": "@react-native-ohos/lottie-react-native",
7
7
  "description": "Native part of lottie-react-native",
8
8
  "main": "index.ets",
9
- "version": "7.2.4-rc.1",
9
+ "version": "7.2.4",
10
10
  "dependencies": {
11
11
  "@rnoh/react-native-openharmony": "file:../react_native_openharmony",
12
12
  "@ohos/lottie": "2.0.29-rc.1"
@@ -40,6 +40,7 @@ export struct LottieAnimationView {
40
40
  private lottieCache = LottieCompositionCache.getInstance();
41
41
  private animateKey: string | null = null;
42
42
  private eventEmitter: RNC.LottieAnimationView.EventEmitter | undefined = undefined
43
+ private isLoaded: boolean = false;
43
44
 
44
45
  aboutToAppear() {
45
46
  // 创建EventEmitter实例,用于处理事件的订阅和触发
@@ -182,6 +183,10 @@ export struct LottieAnimationView {
182
183
  }
183
184
 
184
185
  updateWatchData(): void {
186
+ if (!this.isLoaded) {
187
+ return;
188
+ }
189
+
185
190
  this.progress = this.descriptorWrapper.props.progress;
186
191
  this.speed = this.descriptorWrapper.props.speed;
187
192
  this.loop = Boolean(this.descriptorWrapper.props.loop);
@@ -245,6 +250,7 @@ export struct LottieAnimationView {
245
250
  animationData: this.jsonData
246
251
  });
247
252
  this.animateItem?.addEventListener(LOTTLE_STRING.DOMLoaded, () => {
253
+ this.isLoaded = true;
248
254
  try{
249
255
  let upperResizeMode =
250
256
  this.descriptorWrapper.props?.resizeMode?.replace(this.descriptorWrapper.props.resizeMode[0],
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-ohos/lottie-react-native",
3
- "version": "7.2.4-rc.1",
3
+ "version": "7.2.4",
4
4
  "description": "c-api-foundation",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",