!608 【master】【OpenHarmony 5.0.0.70】【RK3568】【压力测试】【ToC】【高概率】【wukong】出现35次 进程com.ohos.photos下出现jscrash,栈名:anonymous

Merge pull request !608 from liujuan/master
This commit is contained in:
openharmony_ci
2024-10-16 03:30:03 +00:00
committed by Gitee
+14 -3
View File
@@ -281,6 +281,14 @@ export struct PhotoItem {
}
}
isFilterListEmpty(fingerList: FingerInfo[]): FingerInfo[] {
fingerList = fingerList.filter((item: FingerInfo) => item != undefined);
if (fingerList.length === 0) {
Log.error(TAG, 'all elements are undefined');
}
return fingerList;
}
@Builder
buildImage() {
Image(this.thumbnail)
@@ -505,7 +513,7 @@ export struct PhotoItem {
TapGesture({
count: 1
})
.onAction((event?: GestureEvent) => {
.onAction((event: GestureEvent) => {
if (this.isHandlingTap) {
if (this.timerCounter != null) {
clearTimeout(this.timerCounter)
@@ -521,8 +529,11 @@ export struct PhotoItem {
return;
}
Log.info(TAG, `onDoubleTap event: ${JSON.stringify(event)}`);
this.eventPipeline?.onDoubleTap((event as GestureEvent).fingerList[0].localX,
(event as GestureEvent).fingerList[0].localY);
event.fingerList = this.isFilterListEmpty(event.fingerList);
if (event.fingerList.length > 0) {
this.eventPipeline?.onDoubleTap((event as GestureEvent).fingerList[0].localX,
(event as GestureEvent).fingerList[0].localY);
}
if (this.animationOption != null) {
Log.info(TAG, 'TapGesture animateTo start');
animateTo({