mirror of
https://gitee.com/openharmony/applications_photos
synced 2024-11-27 09:12:32 +00:00
update common/src/main/ets/default/utils/UiUtil.ts.
Signed-off-by: liujuan <liujuan76@h-partners.com>
This commit is contained in:
parent
92049f82bd
commit
275c1c0406
@ -20,7 +20,7 @@ import { ScreenManager } from '../model/common/ScreenManager';
|
||||
import prompt from '@system.prompt';
|
||||
import type window from '@ohos.window';
|
||||
import type { Action } from '../view/browserOperation/Action';
|
||||
import { AlbumDefine } from '../model/browser/AlbumDefine';
|
||||
import { AlbumInfo } from '../model/browser/album/AlbumInfo';
|
||||
|
||||
const TAG: string = 'common_UiUtil';
|
||||
|
||||
@ -241,4 +241,21 @@ export class UiUtil {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static getDisplayNameResourceByAlbumInfo(albumInfo: AlbumInfo): Resource {
|
||||
let res: Resource = null;
|
||||
if (albumInfo.isPhotoAlbum) {
|
||||
return $r('app.string.album_photos');
|
||||
} else if (albumInfo.isFavorAlbum) {
|
||||
return $r('app.string.album_favor');
|
||||
} else if (albumInfo.isVideoAlbum) {
|
||||
return $r('app.string.album_video');
|
||||
} else if (albumInfo.isTrashAlbum) {
|
||||
return $r('app.string.album_recycle');
|
||||
} else if (albumInfo.isScreenShotAlbum) {
|
||||
return $r('app.string.album_screen_shot');
|
||||
} else {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user