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

Signed-off-by: liujuan <liujuan76@h-partners.com>
This commit is contained in:
liujuan 2024-02-26 08:50:51 +00:00 committed by Gitee
parent 423b15551c
commit bf70be9828
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -419,14 +419,17 @@ export struct PhotoGridView {
Log.info(TAG, `onDeleteStart`);
this.deleteMode = true;
this.isDataFreeze = true;
this.onModeChange();
MediaObserver.getInstance().unregisterObserver(this.dataObserver);
this.dataSource.freeze();
MediaObserver.getInstance().freezeNotify();
}
onDeleteEnd(): void {
Log.info(TAG, `onDeleteEnd`);
this.isDataFreeze = false;
this.onModeChange();
MediaObserver.getInstance().unfreezeNotify();
MediaObserver.getInstance().forceNotify();
MediaObserver.getInstance().registerObserver(this.dataObserver);
this.dataSource.onChange('image');
this.dataSource.unfreeze();
@ -452,8 +455,9 @@ export struct PhotoGridView {
onModeChange(): void {
Log.info(TAG, 'onModeChange');
this.isSelectedMode = false;
this.isAllSelected = false;
this.mSelectManager.onModeChange(false);
AppStorage.Delete(Constants.PHOTO_GRID_SELECT_MANAGER);
AppStorage.delete(Constants.PHOTO_GRID_SELECT_MANAGER);
}
onPageChanged(): void {