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

View File

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