Commit a8b71fe5 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

[Notifications] Store "Open..." action in history

Actions stop working when the original notification goes away, however the "Open..." notification when a job completed is added and
handled by us, so we can store it in the history and it will continue to function.

BUG: 398732
FIXED-IN: 5.14.0

Differential Revision: https://phabricator.kde.org/D15578
parent e1888de4
......@@ -88,6 +88,12 @@ Column {
else if (showHistory) {
notificationsHistoryModel.inserting = true;
//Disable actions in this copy as they will stop working once the original notification is closed.
//Only the jobUrl (which is a URL to open) can continue working as we'll handle this internally.
var actions = notification.actions.filter(function (item) {
return item.id.indexOf("jobUrl#") === 0;
});
//create a copy of the notification.
//Disable actions in this copy as they will stop working once the original notification is closed.
......@@ -101,7 +107,7 @@ Column {
"created" : new Date(),
"urls" : notification.urls,
"maximumTextHeight" : notification.maximumTextHeight,
"actions" : null,
"actions" : actions,
"hasDefaultAction" : false,
"hasConfigureAction" : false,
});
......
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