mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
lockscreen: Fix drawer not closing when notification button clicked
This commit is contained in:
parent
57192b772b
commit
17f582a150
1 changed files with 7 additions and 2 deletions
|
|
@ -27,6 +27,7 @@ Loader {
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
|
|
||||||
sourceComponent: Item {
|
sourceComponent: Item {
|
||||||
|
// top status bar
|
||||||
MobileShell.StatusBar {
|
MobileShell.StatusBar {
|
||||||
id: statusBar
|
id: statusBar
|
||||||
|
|
||||||
|
|
@ -42,16 +43,17 @@ Loader {
|
||||||
showSecondRow: false
|
showSecondRow: false
|
||||||
showDropShadow: true
|
showDropShadow: true
|
||||||
showTime: false
|
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 {
|
MobileShell.ActionDrawerOpenSurface {
|
||||||
id: swipeArea
|
id: swipeArea
|
||||||
actionDrawer: drawer
|
actionDrawer: drawer
|
||||||
anchors.fill: statusBar
|
anchors.fill: statusBar
|
||||||
}
|
}
|
||||||
|
|
||||||
// swipe-down drawer component
|
// action drawer component
|
||||||
MobileShell.ActionDrawer {
|
MobileShell.ActionDrawer {
|
||||||
id: drawer
|
id: drawer
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
@ -64,12 +66,15 @@ Loader {
|
||||||
|
|
||||||
property bool requestNotificationAction: false
|
property bool requestNotificationAction: false
|
||||||
|
|
||||||
|
// notification button clicked, requesting auth
|
||||||
onPermissionsRequested: {
|
onPermissionsRequested: {
|
||||||
requestNotificationAction = true;
|
requestNotificationAction = true;
|
||||||
|
drawer.close();
|
||||||
root.passwordRequested();
|
root.passwordRequested();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// listen to authentication events
|
||||||
Connections {
|
Connections {
|
||||||
target: authenticator
|
target: authenticator
|
||||||
function onSucceeded() {
|
function onSucceeded() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue