From 17f582a150afe68d31d86d68b0986eec870456ce Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Thu, 7 Apr 2022 14:15:13 -0400 Subject: [PATCH] lockscreen: Fix drawer not closing when notification button clicked --- look-and-feel/contents/lockscreen/HeaderComponent.qml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/look-and-feel/contents/lockscreen/HeaderComponent.qml b/look-and-feel/contents/lockscreen/HeaderComponent.qml index 954d5975..f974708e 100644 --- a/look-and-feel/contents/lockscreen/HeaderComponent.qml +++ b/look-and-feel/contents/lockscreen/HeaderComponent.qml @@ -27,6 +27,7 @@ Loader { asynchronous: true sourceComponent: Item { + // top status bar MobileShell.StatusBar { id: statusBar @@ -42,16 +43,17 @@ Loader { showSecondRow: false showDropShadow: true showTime: false - disableSystemTray: true // HACK: prevent SIGABRT + disableSystemTray: true // prevent SIGABRT, since loading the system tray on the lockscreen leads to bad... things } + // drag down gesture to open action drawer MobileShell.ActionDrawerOpenSurface { id: swipeArea actionDrawer: drawer anchors.fill: statusBar } - // swipe-down drawer component + // action drawer component MobileShell.ActionDrawer { id: drawer anchors.fill: parent @@ -64,12 +66,15 @@ Loader { property bool requestNotificationAction: false + // notification button clicked, requesting auth onPermissionsRequested: { requestNotificationAction = true; + drawer.close(); root.passwordRequested(); } } + // listen to authentication events Connections { target: authenticator function onSucceeded() {