mirror of
https://gitee.com/openharmony/applications_photos
synced 2024-11-26 16:51:35 +00:00
commit
097314e04f
@ -283,7 +283,11 @@ export class ScreenManager {
|
||||
if (this.isUIExtensionEnv()) {
|
||||
return;
|
||||
}
|
||||
this.getMainWindow()?.setWindowBackgroundColor(defaultColor ? '#F1F3F5' : '#000000');
|
||||
try {
|
||||
this.getMainWindow()?.setWindowBackgroundColor(defaultColor ? '#F1F3F5' : '#000000');
|
||||
} catch (error) {
|
||||
Log.error(TAG, 'setWindowBackgroundColorDefault: failed, error info is ' + error + ', code: ' + error?.code);
|
||||
}
|
||||
}
|
||||
|
||||
setSplitScreen(): void {
|
||||
|
@ -36,7 +36,7 @@ export struct AlbumSelectActionBar {
|
||||
@Provide selectedCount: number = 0;
|
||||
onMenuClicked: Function = (): void => {};
|
||||
@Link @Watch('updateMenu') menuList: Action[];
|
||||
@Provide moreMenuList: Action[] = new Array<Action>();
|
||||
@Provide moreMenuList: Action[] = [];
|
||||
@Provide hidePopup: boolean = false;
|
||||
|
||||
aboutToAppear(): void {
|
||||
|
@ -22,7 +22,7 @@ import { PhotoEditorManager } from '../PhotoEditorManager';
|
||||
|
||||
const TAG: string = 'editor_ToolBar';
|
||||
|
||||
const ComPonentKeyEditCrop: string = 'EditToolBarCrop';
|
||||
const comPonentKeyEditCrop: string = 'EditToolBarCrop';
|
||||
|
||||
@Component
|
||||
export struct ToolBar {
|
||||
@ -48,7 +48,7 @@ export struct ToolBar {
|
||||
actionID: undefined,
|
||||
text: $r('app.string.crop_text'),
|
||||
isActive: true,
|
||||
componentKey: ComPonentKeyEditCrop
|
||||
componentKey: comPonentKeyEditCrop
|
||||
})
|
||||
];
|
||||
/**
|
||||
|
@ -438,11 +438,11 @@ export struct PhotoBrowserComponent {
|
||||
if (currentPhoto == undefined || this.isFromViewDataWithThirdUri) {
|
||||
return;
|
||||
}
|
||||
this.photoDate = DateUtil.getLocalizedDate(currentPhoto.getDataTaken());
|
||||
this.photoDate = DateUtil.getLocalizedDate(currentPhoto?.getDataTaken());
|
||||
if (this.pageFrom == Constants.ENTRY_FROM.DISTRIBUTED) {
|
||||
this.timeAndLocation = `${this.deviceName}/${DateUtil.getLocalizedTime(currentPhoto.getDataTaken())}`;
|
||||
this.timeAndLocation = `${this.deviceName}/${DateUtil.getLocalizedTime(currentPhoto?.getDataTaken())}`;
|
||||
} else {
|
||||
this.timeAndLocation = DateUtil.getLocalizedTime(currentPhoto.getDataTaken());
|
||||
this.timeAndLocation = DateUtil.getLocalizedTime(currentPhoto?.getDataTaken());
|
||||
}
|
||||
this.updateMenu(index);
|
||||
}
|
||||
@ -561,11 +561,11 @@ export struct PhotoBrowserComponent {
|
||||
}
|
||||
|
||||
getCurrentPhoto(): MediaItem {
|
||||
return this.dataSource.getRawData(this.currentIndex).data;
|
||||
return this.dataSource?.getRawData(this.currentIndex).data;
|
||||
}
|
||||
|
||||
getPhotoByIndex(index: number): MediaItem {
|
||||
return this.dataSource.getRawData(index).data;
|
||||
return this.dataSource?.getRawData(index).data;
|
||||
}
|
||||
|
||||
async onMoveEnd(err: Object, count: number, total: number): Promise<void> {
|
||||
|
Loading…
Reference in New Issue
Block a user