Commit d6cc2918 authored by Devin Lin's avatar Devin Lin 🎨
Browse files

widgets/notifications: Specify InvokeBehavior when invoking action

parent f8049783
......@@ -149,15 +149,15 @@ Item {
let action = () => {
if (notificationsModelType === NotificationsModelType.WatchedNotificationsModel) {
if (actionName === "") {
notificationsModel.invokeDefaultAction(model.notificationId);
notificationsModel.invokeDefaultAction(model.notificationId, NotificationManager.None);
} else {
notificationsModel.invokeAction(notificationItem.model.notificationId, actionName);
notificationsModel.invokeAction(notificationItem.model.notificationId, actionName, NotificationManager.None);
}
} else if (notificationsModelType === NotificationsModelType.NotificationsModel) {
if (actionName === "default") {
notificationsModel.invokeDefaultAction(notificationsModel.index(modelIndex, 0));
notificationsModel.invokeDefaultAction(notificationsModel.index(modelIndex, 0), NotificationManager.Close); // notification closes
} else {
notificationsModel.invokeAction(notificationsModel.index(modelIndex, 0), actionName);
notificationsModel.invokeAction(notificationsModel.index(modelIndex, 0), actionName, NotificationManager.Close); // notification closes
}
}
expire();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment