!373 Fix Generic functions must be called with explicit type specialization

Merge pull request !373 from nsizov/fix_generic_calls_rebase
This commit is contained in:
openharmony_ci 2023-06-09 01:04:39 +00:00 committed by Gitee
commit 95df5854de
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
27 changed files with 76 additions and 69 deletions

View File

@ -33,6 +33,6 @@ export class BroadcastManager {
}
}
let broadcastManager: BroadcastManager = stashOrGetObject(new BroadcastManager(), TAG);
let broadcastManager: BroadcastManager = stashOrGetObject<BroadcastManager>(new BroadcastManager(), TAG);
export { broadcastManager };

View File

@ -46,9 +46,9 @@ export class AlbumSetNewMenuOperation implements MenuOperation, MenuOperationCal
Log.warn(TAG, 'menuContext is null, return');
return;
}
getResourceString($r('app.string.album_new_album')).then((name: string): void => {
getResourceString($r('app.string.album_new_album')).then<void, void>((name: string): void => {
Log.info(TAG, "The display name is " + name);
this.getNewAlbumDisplayName(name).then((newAlbumDisplayName: string): void => {
this.getNewAlbumDisplayName(name).then<void, void>((newAlbumDisplayName: string): void => {
Log.info(TAG, "The display name of new album is " + newAlbumDisplayName);
this.confirmCallback = (displayName: string): Promise<void> => this.confirmCallbackBindImpl(displayName);
@ -76,7 +76,7 @@ export class AlbumSetNewMenuOperation implements MenuOperation, MenuOperationCal
if (displayName != undefined && displayName != null) {
let isExit = await this.checkAlbumExit(simpleAlbumDataItem);
if (isExit) {
getResourceString($r('app.string.name_already_use')).then((message: string): void => {
getResourceString($r('app.string.name_already_use')).then<void, void>((message: string): void => {
showToast(message);
})
return;

View File

@ -84,7 +84,7 @@ export class BatchDeleteMenuOperation extends ProcessMenuOperation {
protected confirmCallbackBindImpl(): void {
Log.info(TAG, 'Batch delete confirm');
AppStorage.SetOrCreate("isDelete", 1);
AppStorage.SetOrCreate<number>("isDelete", 1);
// 1. Variable initialization
this.onOperationEnd = this.menuContext.onOperationEnd;
@ -111,7 +111,7 @@ export class BatchDeleteMenuOperation extends ProcessMenuOperation {
requestOneBatchOperation(): void {
let item = this.items[this.currentBatch] as MediaDataItem;
if (item != null) {
item.onDelete().then((): void => {
item.onDelete().then<void, void>((): void => {
this.currentBatch++;
this.menuContext.broadCast.emit(BroadcastConstants.UPDATE_PROGRESS, [this.getExpectProgress(), this.currentBatch]);
this.cyclicOperation();

View File

@ -63,7 +63,7 @@ export class BatchRecoverMenuOperation extends ProcessMenuOperation {
// Delete a batch of data
requestOneBatchOperation(): void {
let item = this.items[this.currentBatch] as TrashMediaDataItem;
item.onRecover().then((): void => {
item.onRecover().then<void, void>((): void => {
this.currentBatch++;
this.menuContext.broadCast.emit(BroadcastConstants.UPDATE_PROGRESS, [this.getExpectProgress(), this.currentBatch]);
this.cyclicOperation();

View File

@ -140,7 +140,7 @@ export class CopyMenuOperation extends ProcessMenuOperation {
async copy(source, target, param?): Promise<void> {
try {
if (!Boolean(target).valueOf()) {
if (!Boolean<object>(target).valueOf()) {
startTraceWithTaskId('create', this.currentBatch);
target = await mediaModel.createOne(param.mediaType, param.name, param.path);
finishTraceWithTaskId('create', this.currentBatch);

View File

@ -16,7 +16,7 @@
type CallbackType = Function
export class Broadcast {
private callBackArray: Map<string, CallbackType[]> = new Map();
private callBackArray: Map<string, CallbackType[]> = new Map<string, CallbackType[]>();
constructor() {
}
@ -34,7 +34,7 @@ export class Broadcast {
}
const cbs: CallbackType[] = this.callBackArray.get(event);
if (!Boolean(cbs).valueOf()) {
if (!Boolean<Function[]>(cbs).valueOf()) {
return;
}
if (callback == null) {
@ -53,7 +53,7 @@ export class Broadcast {
public emit(event: string, args: Object[]): void {
let _self = this;
if (!Boolean(this.callBackArray.get(event)).valueOf()) {
if (!Boolean<Function[]>(this.callBackArray.get(event)).valueOf()) {
return;
}

View File

@ -31,10 +31,10 @@ class DataStoreUtil {
}
public getInstance(): DataStoreUtil {
if (AppStorage.Get( DataStoreUtil.FROM_DATA_STORE_UTIL) == null) {
AppStorage.SetOrCreate( DataStoreUtil.FROM_DATA_STORE_UTIL, new DataStoreUtil());
if (AppStorage.Get<void>( DataStoreUtil.FROM_DATA_STORE_UTIL) == null) {
AppStorage.SetOrCreate<DataStoreUtil>( DataStoreUtil.FROM_DATA_STORE_UTIL, new DataStoreUtil());
}
return AppStorage.Get( DataStoreUtil.FROM_DATA_STORE_UTIL);
return AppStorage.Get<DataStoreUtil>( DataStoreUtil.FROM_DATA_STORE_UTIL);
}
public async init(): Promise<void> {
@ -137,7 +137,7 @@ class DataStoreUtil {
}
}
let dataStore: DataStoreUtil = stashOrGetObject(new DataStoreUtil(), TAG);
let dataStore: DataStoreUtil = stashOrGetObject<DataStoreUtil>(new DataStoreUtil(), TAG);
export { dataStore };

View File

@ -29,7 +29,7 @@ export class DateUtil {
private static initLanguageLocalesMap(): void {
if (DateUtil.LANGUAGE_LOCALES_MAP == null) {
DateUtil.LANGUAGE_LOCALES_MAP = new Map();
DateUtil.LANGUAGE_LOCALES_MAP = new Map<string, string>();
DateUtil.LANGUAGE_LOCALES_MAP.set("zh", "zh-CN");
DateUtil.LANGUAGE_LOCALES_MAP.set("en", "en-US");
}
@ -43,10 +43,10 @@ export class DateUtil {
}
public static format(time: Date, format_s?: string): string {
if (!Boolean(format_s).valueOf()) {
if (!Boolean<string>(format_s).valueOf()) {
return time.valueOf().toString();
}
let opts: Map<string, number> = new Map();
let opts: Map<string, number> = new Map<string, number>();
opts.set('MM', time.getMonth() + 1);
opts.set('dd', time.getDate());
opts.set('HH', time.getHours());
@ -112,7 +112,7 @@ export class DateUtil {
let is24HourClock = i18n.is24HourClock();
Log.info(TAG, "get is24HourClock " + is24HourClock);
return new Intl.DateTimeFormat(locales, this.buildDateTimeOpt('', '', '', (!Boolean(is24HourClock).valueOf() ? '2-digit' : 'numeric'), '2-digit')).format(new Date(milliseconds));
return new Intl.DateTimeFormat(locales, this.buildDateTimeOpt('', '', '', (!Boolean<boolean>(is24HourClock).valueOf() ? '2-digit' : 'numeric'), '2-digit')).format(new Date(milliseconds));
}
static getLocales(): string {

View File

@ -150,7 +150,7 @@ export class AlbumsDataSource extends ItemDataSource {
}
dataReload(): void {
this.reloadAlbumItemData().then((isEmpty: boolean): void => {
this.reloadAlbumItemData().then<void, void>((isEmpty: boolean): void => {
this.notifyDataReload();
})
}
@ -172,7 +172,7 @@ export class AlbumsDataSource extends ItemDataSource {
async reloadAlbumListItemData(): Promise<boolean> {
Log.info(TAG, "reloadAlbumListItemData");
this.albumDataItems = await this.albumDataImpl.reloadAlbumListItemData();
this.reloadResetAlbumItemData().then((count: number): void => {
this.reloadResetAlbumItemData().then<void, void>((count: number): void => {
Log.info(TAG, "reloadResetAlbumItemData reset: " + count);
})
return this.albumDataItems.length == 0;

View File

@ -79,7 +79,7 @@ export class DistributedDataSource extends ItemDataSource {
}
dataReload(): void {
this.reloadAlbumItemData().then((isEmpty: number): void => {
this.reloadAlbumItemData().then<void, void>((isEmpty: number): void => {
this.notifyDataReload();
})
}

View File

@ -29,11 +29,12 @@ export class FormAbility extends FormExtension {
onAddForm(want: Want): formBindingData.FormBindingData | null {
Log.info(this.TAG, "form onAddForm. want " + JSON.stringify(want));
this.init();
let param: Map<string, object> = new Map(Object.entries(want.parameters));
let param: Map<string, object> = new Map<string, object>(Object.entries<object>(want.parameters));
let formId: string = param.get('ohos.extra.param.key.form_identity').toString();
Log.info(this.TAG, "form onAddForm formId: " + formId);
let formControllerManager: FormControllerManager = FormControllerManager.getInstance();
formControllerManager.initData(formId, Constants.PHOTOS_FORM_OPERATION_MODE_NONE).then((): Object | null => {
let promise: Promise<void> = formControllerManager.initData(formId, Constants.PHOTOS_FORM_OPERATION_MODE_NONE);
promise.then<object, never>((): Object | null => {
let formController: FormController = formControllerManager.getController(formId);
Log.info(this.TAG, "form onAddForm. formController " + formController);
formController = (formController == null) ? formControllerManager.createFormController(formId,
@ -43,7 +44,7 @@ export class FormAbility extends FormExtension {
return null;
}
return formController.bindFormData(formId);
}).catch((err: Error): void => {
}).catch<void>((err: Error): void => {
Log.error(this.TAG, "init err " + err);
})
return null;
@ -65,7 +66,7 @@ export class FormAbility extends FormExtension {
Log.info(this.TAG, "onChangeFormVisibility, newStatus: " + JSON.stringify(newStatus));
// 经常起来后可能直接走onChangeFormVisibility 所以要初始化一下
this.init();
let ns: Map<string, number> = new Map(Object.entries(newStatus));
let ns: Map<string, number> = new Map<string, number>(Object.entries<number>(newStatus));
this.clearCache(ns);
}

View File

@ -116,7 +116,7 @@ export class FormController {
};
Log.debug(TAG, "routerPhotoBrowser parm " + JSON.stringify(param));
startAbility(param).then((): void => {
startAbility(param).then<void, void>((): void => {
AppStorage.Delete(Constants.FROM_CONTROLLER_MANAGER);
})
this.onDestroy();
@ -126,7 +126,8 @@ export class FormController {
onTriggerFormEvent(formId: string, message): void {
Log.debug(TAG, "onTriggerFormEvent " + formId + " " + message);
let msgObj: Map<string, object> = JSON.parse(message);
let param: Map<string, object> = new Map(Object.entries(msgObj.get("params")));
let entries = Object.entries<Object[]>(msgObj.get("params") as ArrayLike<Object[]>);
let param: Map<string, object> = new Map<string, object>(entries);
let msg: string = param.get("message").toString();
Log.debug(TAG, "onTriggerFormEvent " + param + " " + msg);
if (msg == FormController.MSG_ROUTER_PHOTOS) {

View File

@ -19,17 +19,17 @@ import { dataStore } from '@ohos/base/src/main/ets/utils/DataStoreUtil';
export class FormControllerManager {
private TAG: string = 'FormControllerManager';
private formControllerMap = new Map();
private formControllerMap = new Map<string, FormController>();
private constructor() {
Log.info(this.TAG, 'new FormControllerManager');
}
public static getInstance(): FormControllerManager {
if (AppStorage.Get(Constants.FROM_CONTROLLER_MANAGER) == null) {
AppStorage.SetOrCreate(Constants.FROM_CONTROLLER_MANAGER, new FormControllerManager());
if (AppStorage.Get<void>(Constants.FROM_CONTROLLER_MANAGER) == null) {
AppStorage.SetOrCreate<FormControllerManager>(Constants.FROM_CONTROLLER_MANAGER, new FormControllerManager());
}
return AppStorage.Get(Constants.FROM_CONTROLLER_MANAGER);
return AppStorage.Get<FormControllerManager>(Constants.FROM_CONTROLLER_MANAGER);
}
public createFormController(formId: string, operationMode: number, callback?: Function): FormController {

View File

@ -73,10 +73,10 @@ export struct AddNotesDialog {
let check: RegExp = new RegExp("/[\\.\\\\/:*?<>\"|\[\]{}\s]/");
let passCheck = check.test(this.inputNote)
if (passCheck) {
getResourceString($r('app.string.specific_characters_not_supported'))
.then((message: string): void => {
showToast(message)
})
let p: Promise<string> = getResourceString($r('app.string.specific_characters_not_supported'));
p.then<void, void>((message: string): void => {
showToast(message)
});
this.controller.close()
return
}

View File

@ -449,7 +449,7 @@ export struct CustomDialogView {
private showDetailDialog(item: MediaDataItem, isDistributed: boolean): void {
Log.info(TAG, 'SHOW_DETAIL_DIALOG ');
item.load(true).then((): void => {
item.load(true).then<void, void>((): void => {
this.mediaDetails = {
mediaType: item.mediaType,
height: item.height,

View File

@ -234,7 +234,8 @@ export struct AlbumSetPage {
this.tabs[Constants.LOCAL_TAB_INDEX].isSelected = false;
this.tabs[Constants.OTHER_EQUIPMENT_TAB_INDEX].isSelected = true;
}
this.distributedDataSource.reloadAlbumItemData().then((change: number): void => {
let promise: Promise<number> = this.distributedDataSource.reloadAlbumItemData();
promise.then<void, void>((change: number): void => {
this.onUpdateRemoteDevice(change);
this.distributedDataSource.notifyDataReload();
})
@ -393,7 +394,8 @@ export struct AlbumSetPage {
private showNotify(): void {
if (this.needNotify) {
getResourceString($r('app.string.distributed_album_disconnected')).then((message: string): void => {
let promise: Promise<string> = getResourceString($r('app.string.distributed_album_disconnected'));
promise.then<void, void>((message: string): void => {
showToast(message);
})
this.needNotify = false;
@ -431,7 +433,7 @@ export struct AlbumSetPage {
onMediaLibDataChange(changeType): void {
Log.info(TAG, 'onMediaLibDataChange type: ' + changeType);
if (changeType == MediaConstants.MEDIA_TYPE_REMOTE) {
this.distributedDataSource.reloadAlbumItemData().then((change: number): void => {
this.distributedDataSource.reloadAlbumItemData().then<void, void>((change: number): void => {
this.onUpdateRemoteDevice(change)
this.distributedDataSource.notifyDataReload()
})
@ -444,7 +446,7 @@ export struct AlbumSetPage {
private loadItem(): void {
if (this.isActive && this.isMediaLibDataChanged) {
this.albumsDataSource.reloadAlbumItemData().then((isEmpty: boolean): void => {
this.albumsDataSource.reloadAlbumItemData().then<void, void>((isEmpty: boolean): void => {
this.isEmpty = isEmpty;
this.albumsDataSource.notifyDataReload();
this.isHideScrollBar = (this.albumsDataSource.totalCount() <= (this.gridColumnsCount * Constants.NUMBER_3 - Constants.NUMBER_1));
@ -488,7 +490,7 @@ export struct AlbumSetPage {
private loadAlbums(isForce: boolean): void {
if (isForce || this.currentIndex == Constants.LOCAL_TAB_INDEX) {
this.albumsDataSource.reloadAlbumItemData().then((isEmpty: boolean): void => {
this.albumsDataSource.reloadAlbumItemData().then<void, void>((isEmpty: boolean): void => {
this.isEmpty = isEmpty;
this.albumsDataSource.notifyDataReload();
})

View File

@ -78,9 +78,9 @@ struct AlbumSelect {
let param: ParamsInterface = router.getParams();
if (param != null) {
if (param.isNewAlbum != null && param.isNewAlbum == true) {
AppStorage.SetOrCreate(Constants.APP_KEY_NEW_ALBUM, true);
AppStorage.SetOrCreate<boolean>(Constants.APP_KEY_NEW_ALBUM, true);
} else {
AppStorage.SetOrCreate(Constants.APP_KEY_NEW_ALBUM, false);
AppStorage.SetOrCreate<boolean>(Constants.APP_KEY_NEW_ALBUM, false);
}
let albumInfo: SimpleAlbumDataItem = undefined;
if(param.albumInfo != null) {
@ -93,7 +93,7 @@ struct AlbumSelect {
this.albumsDataSource.setBlackList([MediaConstants.ALBUM_ID_RECYCLE]);
}
AppStorage.SetOrCreate(Constants.APP_KEY_NEW_ALBUM_TARGET, albumInfo);
AppStorage.SetOrCreate<SimpleAlbumDataItem>(Constants.APP_KEY_NEW_ALBUM_TARGET, albumInfo);
}
this.loadAlbums();
@ -103,7 +103,7 @@ struct AlbumSelect {
}
private loadAlbums(): void {
this.albumsDataSource.reloadAlbumItemData().then((isEmpty: boolean): void => {
this.albumsDataSource.reloadAlbumItemData().then<void, void>((isEmpty: boolean): void => {
this.isEmpty = isEmpty;
this.albumsDataSource.notifyDataReload();
})

View File

@ -176,7 +176,7 @@ struct DistributedAlbumSetPage {
private loadItem(): void {
if (this.isActive && this.isMediaLibDataChanged) {
this.albumsDataSource.reloadAlbumItemData().then((isEmpty: boolean): void => {
this.albumsDataSource.reloadAlbumItemData().then<void, void>((isEmpty: boolean): void => {
this.isEmpty = isEmpty;
this.albumsDataSource.notifyDataReload();
})

View File

@ -19,10 +19,10 @@ export class DateUtil {
public static formats(format?: string): string {
let time = new Date();
if (!Boolean(format).valueOf()) {
if (!Boolean<string>(format).valueOf()) {
return time.valueOf().toString();
}
let opts: Map<string, number> = new Map();
let opts: Map<string, number> = new Map<string, number>();
opts.set('MM', time.getMonth() + 1);
opts.set('dd', time.getDate());
opts.set('HH', time.getHours());
@ -46,7 +46,7 @@ export class DateUtil {
public static nameByDate(isReplace: Boolean, name?: string): string {
if (isReplace != null && isReplace == true) {
return (!Boolean(name).valueOf()) ? null : (name.indexOf(DateUtil.NEW_NAME_EDIT) == -1 ? name.split('.')[0] + '_' + DateUtil.NEW_NAME_EDIT + DateUtil.formats() : name.split('.')[0]);
return (!Boolean<string>(name).valueOf()) ? null : (name.indexOf(DateUtil.NEW_NAME_EDIT) == -1 ? name.split('.')[0] + '_' + DateUtil.NEW_NAME_EDIT + DateUtil.formats() : name.split('.')[0]);
} else {
return DateUtil.NEW_NAME_IMG + DateUtil.formats('yyyyMMdd_HHmmss');
}

View File

@ -212,19 +212,20 @@ struct FormEditorPage {
Log.debug(TAG, 'aboutToAppear start!');
this.appBroadcast.on(BroadcastConstants.SAVE_FORM_EDITOR_DATA, this.saveDataFunc);
this.appBroadcast.on(Constants.FROM_PLAYBACK_INTERVAL, this.onChangeFunc);
dataStore.init().then((): void => {
dataStore.init().then<void, void>((): void => {
let intervalTimeKey = 'intervalTime';
dataStore.getData(intervalTimeKey, this.time).then((d: Object): void => {
this.time = d as number;
let promise: Promise<object> = dataStore.getData(intervalTimeKey, this.time);
promise.then<void, void>((d: Object): void => {
this.time = d as unknown as number;
this.setIntervalTime();
AppStorage.SetOrCreate(Constants.FROM_PLAYBACK_INTERVAL, this.time);
AppStorage.SetOrCreate<number>(Constants.FROM_PLAYBACK_INTERVAL, this.time);
})
let isShowKey = 'isShow_' + this.formId;
dataStore.getData(isShowKey, this.isShow).then((d: Object): void => {
dataStore.getData(isShowKey, this.isShow).then<void, void>((d: Object): void => {
this.isShow = d as boolean;
})
let arkUriKey = 'arkUri_' + this.formId;
dataStore.getData(arkUriKey, this.arkUri).then((d: Object): void => {
dataStore.getData(arkUriKey, this.arkUri).then<void, void>((d: Object): void => {
if (d == 0) {
d = 1;
} else {
@ -247,7 +248,7 @@ struct FormEditorPage {
private onTabChangedBindImpl(value: number): void {
this.time = value;
this.setIntervalTime();
AppStorage.SetOrCreate(Constants.FROM_PLAYBACK_INTERVAL, this.time);
AppStorage.SetOrCreate<number>(Constants.FROM_PLAYBACK_INTERVAL, this.time);
this.updateTime();
}

View File

@ -69,7 +69,8 @@ export struct CameraGridItemComponent {
.justifyContent(FlexAlign.Center)
.alignItems(HorizontalAlign.Center)
.onClick((event: ClickEvent): void => {
this.jumpCameraTakephoto().then((result: common.AbilityResult): void => {
let promise: Promise<object> = this.jumpCameraTakephoto();
promise.then<void, void>((result: common.AbilityResult): void => {
Log.info(TAG, 'resourceUri = ' + result?.want?.parameters?.resourceUri);
this.resultUri = result?.want?.parameters?.resourceUri as string;
}).catch((err: Error): void => {

View File

@ -70,7 +70,7 @@ export struct AlbumGridItemNewStyle {
this.selectable = this.item.id != MediaConstants.ALBUM_ID_RECYCLE;
screenManager.on(screenManager.ON_WIN_SIZE_CHANGED, (): void => this.updateCardSize());
startTrace("loadAlbumItem");
this.item.load().then((): void => {
this.item.load().then<void, void>((): void => {
finishTrace("loadAlbumItem");
this.thumbnail = this.item.getThumbnail();
})
@ -78,7 +78,7 @@ export struct AlbumGridItemNewStyle {
}
onIndexPageShow(): void {
this.item.load().then((): void => {
this.item.load().then<void, void>((): void => {
this.thumbnail = this.item.getThumbnail();
})
}

View File

@ -49,7 +49,7 @@ export class AlbumSetDeleteMenuOperation extends ProcessMenuOperation {
this.cancelCallback = (): void => this.cancelCallbackBindImpl();
let deleteResource: Resource = $r('app.string.dialog_delete');
this.getDialogTitle().then((dialogTitle: Resource): void => {
this.getDialogTitle().then<void, void>((dialogTitle: Resource): void => {
this.menuContext.broadCast.emit(BroadcastConstants.SHOW_DELETE_DIALOG, [dialogTitle, deleteResource, this.confirmCallback, this.cancelCallback]);
})
}
@ -89,11 +89,12 @@ export class AlbumSetDeleteMenuOperation extends ProcessMenuOperation {
// Delete a batch of data
requestOneBatchOperation(): void {
let item = this.items[this.currentBatch] as AlbumDataItem;
item.onDelete().then((): void => {
let promise: Promise<boolean> = item.onDelete();
promise.then<void, void>((): void => {
this.currentBatch++
this.menuContext.broadCast.emit(BroadcastConstants.UPDATE_PROGRESS, [this.getExpectProgress(), this.currentBatch]);
this.cyclicOperation();
}).catch((): void => {
}).catch<void>((): void => {
this.onError();
})
}

View File

@ -95,7 +95,7 @@ export class AlbumSetRenameMenuOperation implements MenuOperation, MenuOperation
if (name != null) {
let isExit = await this.checkAlbumExit(simpleAlbumDataItem);
if (isExit) {
getResourceString($r('app.string.name_already_use')).then((message: string): void => {
getResourceString($r('app.string.name_already_use')).then<void, void>((message: string): void => {
showToast(message)
})
Log.warn(TAG, "album is miss")

View File

@ -57,7 +57,7 @@ export struct AlbumGridItemTraditionalStyle {
this.updateCardSize();
})
this.updateCardSize();
this.item.load().then((): void => {
this.item.load().then<void, void>((): void => {
this.thumbnail = this.item.getThumbnail()
})
}

View File

@ -30,10 +30,10 @@ export struct AlbumListCard {
aboutToAppear(): void {
Log.info(TAG, 'album mediaSet ' + JSON.stringify(this.item));
this.item.load().then((): void => {
this.item.load().then<void, void>((): void => {
this.thumbnail = this.item.getThumbnail();
})
this.item.getVideoCount().then((videoCount: number): void => {
this.item.getVideoCount().then<void, void>((videoCount: number): void => {
this.mediaRes = this.showMediaRes(videoCount);
})
}

View File

@ -54,8 +54,8 @@ export struct AlbumSelectGridItemNewStyle {
aboutToAppear(): void {
Log.debug(TAG, 'aboutToAppear + ' + this.item.uri);
screenManager.on(screenManager.ON_WIN_SIZE_CHANGED, (): void => this.updateCardSize());
this.item.load().then((): void => {
screenManager.on(screenManager.ON_WIN_SIZE_CHANGED, (): void => this.updateCardSize());
this.item.load().then<void, void>((): void => {
this.thumbnail = this.item.getThumbnail()
})
this.updateCardSize();