mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
notification: fixed warning introduced by previous "close on LMB"
This commit is contained in:
@@ -303,20 +303,20 @@ Variants {
|
||||
hoverEnabled: true
|
||||
onEntered: card.hoverCount++
|
||||
onExited: card.hoverCount--
|
||||
onClicked: {
|
||||
if (mouse.button === Qt.RightButton) {
|
||||
animateOut();
|
||||
} else if (mouse.button === Qt.LeftButton) {
|
||||
var actions = model.actionsJson ? JSON.parse(model.actionsJson) : [];
|
||||
var hasDefault = actions.some(function (a) {
|
||||
return a.identifier === "default";
|
||||
});
|
||||
if (hasDefault) {
|
||||
NotificationService.invokeAction(notificationId, "default");
|
||||
animateOut();
|
||||
}
|
||||
}
|
||||
}
|
||||
onClicked: mouse => {
|
||||
if (mouse.button === Qt.RightButton) {
|
||||
card.animateOut();
|
||||
} else if (mouse.button === Qt.LeftButton) {
|
||||
var actions = model.actionsJson ? JSON.parse(model.actionsJson) : [];
|
||||
var hasDefault = actions.some(function (a) {
|
||||
return a.identifier === "default";
|
||||
});
|
||||
if (hasDefault) {
|
||||
NotificationService.invokeAction(notificationId, "default");
|
||||
card.animateOut();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Animation setup
|
||||
function triggerEntryAnimation() {
|
||||
|
||||
Reference in New Issue
Block a user