notification: fixed warning introduced by previous "close on LMB"

This commit is contained in:
Lemmy
2026-02-10 10:23:05 -05:00
parent ad6c098139
commit 3328beec86
2 changed files with 21 additions and 14 deletions
+14 -14
View File
@@ -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() {