mirror of
https://gitee.com/openharmony/applications_photos
synced 2024-11-23 15:10:25 +00:00
Fix runtime error with AlbumInfo = undefined Signed-off-by: Evgeniy Nikeytsev <nikeytsev.evgeniy@huawei-partners.com>
This commit is contained in:
parent
95df5854de
commit
89ce1e3c3a
@ -41,6 +41,4 @@ class MediaDataItemCache {
|
||||
}
|
||||
}
|
||||
|
||||
let mediaDataItemCache: MediaDataItemCache = stashOrGetObject<MediaDataItemCache>(new MediaDataItemCache(), TAG);
|
||||
|
||||
export { mediaDataItemCache };
|
||||
export let mediaDataItemCache: MediaDataItemCache = stashOrGetObject<MediaDataItemCache>(new MediaDataItemCache(), TAG);
|
||||
|
@ -41,6 +41,4 @@ class TrashMediaDataItemCache {
|
||||
}
|
||||
}
|
||||
|
||||
let trashMediaDataItemCache: TrashMediaDataItemCache = stashOrGetObject<TrashMediaDataItemCache>(new TrashMediaDataItemCache(), TAG);
|
||||
|
||||
export { trashMediaDataItemCache };
|
||||
export let trashMediaDataItemCache: TrashMediaDataItemCache = stashOrGetObject<TrashMediaDataItemCache>(new TrashMediaDataItemCache(), TAG);
|
||||
|
@ -33,6 +33,4 @@ export class BroadcastManager {
|
||||
}
|
||||
}
|
||||
|
||||
let broadcastManager: BroadcastManager = stashOrGetObject<BroadcastManager>(new BroadcastManager(), TAG);
|
||||
|
||||
export { broadcastManager };
|
||||
export let broadcastManager: BroadcastManager = stashOrGetObject<BroadcastManager>(new BroadcastManager(), TAG);
|
||||
|
@ -74,6 +74,4 @@ export class MultimodalInputManager {
|
||||
}
|
||||
}
|
||||
|
||||
let mMultimodalInputManager = new MultimodalInputManager();
|
||||
|
||||
export { mMultimodalInputManager };
|
||||
export let mMultimodalInputManager = new MultimodalInputManager();
|
||||
|
@ -449,6 +449,4 @@ class ScreenManager {
|
||||
}
|
||||
}
|
||||
|
||||
let screenManager: ScreenManager = stashOrGetObject<ScreenManager>(new ScreenManager(), TAG);
|
||||
|
||||
export { screenManager };
|
||||
export let screenManager: ScreenManager = stashOrGetObject<ScreenManager>(new ScreenManager(), TAG);
|
||||
|
@ -36,6 +36,4 @@ class SelectManager {
|
||||
}
|
||||
}
|
||||
|
||||
let selectManager: SelectManager = stashOrGetObject<SelectManager>(new SelectManager(), TAG);
|
||||
|
||||
export { selectManager };
|
||||
export let selectManager: SelectManager = stashOrGetObject<SelectManager>(new SelectManager(), TAG);
|
||||
|
@ -424,6 +424,4 @@ class MediaModel {
|
||||
}
|
||||
}
|
||||
|
||||
let mediaModel: MediaModel = stashOrGetObject<MediaModel>(new MediaModel(), TAG);
|
||||
|
||||
export { mediaModel };
|
||||
export let mediaModel: MediaModel = stashOrGetObject<MediaModel>(new MediaModel(), TAG);
|
||||
|
@ -88,6 +88,4 @@ class MediaObserver {
|
||||
}
|
||||
}
|
||||
|
||||
let mediaObserver: MediaObserver = stashOrGetObject<MediaObserver>(new MediaObserver(), TAG);
|
||||
|
||||
export { mediaObserver };
|
||||
export let mediaObserver: MediaObserver = stashOrGetObject<MediaObserver>(new MediaObserver(), TAG);
|
||||
|
@ -137,7 +137,4 @@ class DataStoreUtil {
|
||||
}
|
||||
}
|
||||
|
||||
let dataStore: DataStoreUtil = stashOrGetObject<DataStoreUtil>(new DataStoreUtil(), TAG);
|
||||
|
||||
export { dataStore };
|
||||
|
||||
export let dataStore: DataStoreUtil = stashOrGetObject<DataStoreUtil>(new DataStoreUtil(), TAG);
|
||||
|
@ -110,9 +110,9 @@ export class FormController {
|
||||
currentIndex: this.mediaDataManager.getMediaData().currentIndex
|
||||
};
|
||||
let param: Want = {
|
||||
'bundleName': 'com.ohos.photos',
|
||||
'abilityName': 'com.ohos.photos.MainAbility',
|
||||
'parameters': wantParameters
|
||||
bundleName: 'com.ohos.photos',
|
||||
abilityName: 'com.ohos.photos.MainAbility',
|
||||
parameters: wantParameters
|
||||
|
||||
};
|
||||
Log.debug(TAG, "routerPhotoBrowser parm " + JSON.stringify(param));
|
||||
|
@ -168,7 +168,7 @@ struct PhotoBrowser {
|
||||
}
|
||||
menuContext.withItems([currentPhoto])
|
||||
.withDeletePageFromType(BroadcastConstants.DELETE_FROM_BROWSER)
|
||||
.withAlbumId( Boolean<string>(this.albumInfo.id).valueOf() ? this.albumInfo.id : (Boolean<SimpleAlbumDataItem>(this.albumInfo).valueOf() ? this.albumInfo.toString() : "") )
|
||||
.withAlbumId( Boolean<SimpleAlbumDataItem>(this.albumInfo) ? ( Boolean<string>(this.albumInfo.id) ? this.albumInfo.id : this.albumInfo.toString() ) : "")
|
||||
.withBroadCast(this.broadCast)
|
||||
.withOperationEndCallback((): void => this.onDeleteEndBindImpl())
|
||||
menuOperation = new BatchDeleteMenuOperation(menuContext);
|
||||
|
Loading…
Reference in New Issue
Block a user