!128 I93U4A master 设置锁屏密码后,锁屏状态下点击屏幕中的消息通知,通知会直接消失,且界面无其他变化

Merge pull request !128 from 王环/master
This commit is contained in:
openharmony_ci 2024-03-26 07:41:20 +00:00 committed by Gitee
commit 6eb210c38a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 11 additions and 0 deletions

View File

@ -75,6 +75,7 @@ export default struct NotificationItem {
@Component
struct FrontItem {
@Consume isClickFrontItem: boolean
private itemData: any = {}
private nowWant: any;
private isSubItem: boolean= false;
@ -101,6 +102,7 @@ struct FrontItem {
showDevicesDialog() {
Log.showDebug(TAG, `showDevicesDialog isDistributed: ${this.itemData?.distributedOption?.isDistributed}`)
this.isClickFrontItem = true
if (!this.itemData?.distributedOption?.isDistributed) {
ViewModel.clickItem(this.itemData);
return;

View File

@ -33,6 +33,7 @@ export default struct SlideScreenlock {
@Prop @Watch("onStatusChange") pageStatus: number
@StorageLink('deviceStatus') @Watch('onDeviceStatusChange') deviceStatus: string = ""
@StorageLink('isWallpaperShow') isWallpaperShow: boolean = true
@Provide @Watch('unlockScreen') isClickFrontItem: boolean = false
private mHeightPx : number = 48
aboutToAppear() {
Log.showInfo(TAG, `aboutToAppear`)
@ -51,6 +52,14 @@ export default struct SlideScreenlock {
Log.showInfo(TAG, `onPageHide`)
}
unlockScreen() {
Log.showInfo(TAG, `unlockScreen in, isClickFrontItem${this.isClickFrontItem}`)
if (this.isClickFrontItem) {
this.mViewModel.unlockScreen()
}
this.isClickFrontItem = false
}
build() {
Stack({ alignContent: Alignment.Bottom }) {
Column() {