mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-02 09:48:50 +00:00
widgets/notifications: Specify InvokeBehavior when invoking action
This commit is contained in:
parent
f8049783af
commit
d6cc2918e0
1 changed files with 4 additions and 4 deletions
|
|
@ -149,15 +149,15 @@ Item {
|
||||||
let action = () => {
|
let action = () => {
|
||||||
if (notificationsModelType === NotificationsModelType.WatchedNotificationsModel) {
|
if (notificationsModelType === NotificationsModelType.WatchedNotificationsModel) {
|
||||||
if (actionName === "") {
|
if (actionName === "") {
|
||||||
notificationsModel.invokeDefaultAction(model.notificationId);
|
notificationsModel.invokeDefaultAction(model.notificationId, NotificationManager.None);
|
||||||
} else {
|
} else {
|
||||||
notificationsModel.invokeAction(notificationItem.model.notificationId, actionName);
|
notificationsModel.invokeAction(notificationItem.model.notificationId, actionName, NotificationManager.None);
|
||||||
}
|
}
|
||||||
} else if (notificationsModelType === NotificationsModelType.NotificationsModel) {
|
} else if (notificationsModelType === NotificationsModelType.NotificationsModel) {
|
||||||
if (actionName === "default") {
|
if (actionName === "default") {
|
||||||
notificationsModel.invokeDefaultAction(notificationsModel.index(modelIndex, 0));
|
notificationsModel.invokeDefaultAction(notificationsModel.index(modelIndex, 0), NotificationManager.Close); // notification closes
|
||||||
} else {
|
} else {
|
||||||
notificationsModel.invokeAction(notificationsModel.index(modelIndex, 0), actionName);
|
notificationsModel.invokeAction(notificationsModel.index(modelIndex, 0), actionName, NotificationManager.Close); // notification closes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
expire();
|
expire();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue