Fix #1, #124 remaining linter errors: Object literal properties and export list

Fix runtime error with AlbumInfo = undefined

Signed-off-by: Evgeniy Nikeytsev <nikeytsev.evgeniy@huawei-partners.com>
This commit is contained in:
Evgeniy Nikeytsev 2023-06-08 17:54:55 +03:00
parent 95df5854de
commit 89ce1e3c3a
11 changed files with 13 additions and 32 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -74,6 +74,4 @@ export class MultimodalInputManager {
}
}
let mMultimodalInputManager = new MultimodalInputManager();
export { mMultimodalInputManager };
export let mMultimodalInputManager = new MultimodalInputManager();

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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));

View File

@ -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);