update product/phone/src/main/ets/view/PhotoBrowserComponent.ets.

Signed-off-by: liujuan <liujuan76@h-partners.com>
This commit is contained in:
liujuan 2024-03-28 12:17:28 +00:00 committed by Gitee
parent 1dab22623a
commit 30efc20066
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -729,6 +729,7 @@ export struct PhotoBrowserComponent {
aboutToAppear(): void {
TraceControllerUtils.startTrace('PhotoBrowserAboutToAppear');
Log.info(TAG, 'photoBrowser aboutToAppear');
AppStorage.setOrCreate('isEditFunc', false);
this.geometryTransitionId = AppStorage.get<string>('geometryTransitionBrowserId') as string;
this.hasAppeared = true;
this.updateIsHorizontal();
@ -972,6 +973,9 @@ export struct PhotoBrowserComponent {
private onDataContentChanged(): void {
this.reportToBigDataForCameraIn();
Log.debug(TAG, `PhotoConstants.DATA_CONTENT_CHANGED`);
if (AppStorage.get('isEditFunc')) {
this.currentIndex = 0;
}
this.onPhotoChanged(this.currentIndex);
}