!574 【mater】剩余告警处理

Merge pull request !574 from liujuan/master
This commit is contained in:
openharmony_ci 2024-06-01 08:11:11 +00:00 committed by Gitee
commit 097314e04f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 13 additions and 9 deletions

View File

@ -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 {

View File

@ -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 {

View File

@ -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
})
];
/**

View File

@ -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> {