Commit 2c26add6 authored by Thomas Greiner's avatar Thomas Greiner

Issue #419 - Fixed: New properties were missing from converted filter objects

parent 0bbaebd7
......@@ -65,6 +65,12 @@
return result;
}
function convertSubscriptionFilters(subscription)
{
const filters = Array.from(subscription.filterText(), Filter.fromText);
return filters.map(convertFilter);
}
function convertSubscription(subscription)
{
const obj = convertObject(["disabled", "downloadStatus", "homepage",
......@@ -72,7 +78,7 @@
"softExpiration", "expires", "title",
"url"], subscription);
if (subscription instanceof SpecialSubscription)
obj.filters = Array.from(subscription.filterText(), convertFilterText);
obj.filters = convertSubscriptionFilters(subscription);
obj.downloading = synchronizer.isExecuting(subscription.url);
return obj;
......@@ -92,7 +98,6 @@
return obj;
}
const convertFilterText = (text) => convertFilter({text});
const uiPorts = new Map();
const listenedPreferences = Object.create(null);
const listenedFilterChanges = Object.create(null);
......@@ -325,7 +330,7 @@
if (!subscription)
return [];
return Array.from(subscription.filterText(), convertFilterText);
return convertSubscriptionFilters(subscription);
});
port.on("filters.importRaw", (message, sender) =>
......
Markdown is supported
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