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

Signed-off-by: 王环 <18108170464@163.com>
This commit is contained in:
王环 2024-03-22 11:39:01 +08:00
parent 399770642c
commit 49ec7b513c
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() {