fix: regression where filter:settings.set no longer received sorted-lists

This commit is contained in:
Julian Lam
2021-01-31 16:56:49 -05:00
parent 5bc1f5b4e8
commit a8be6fb8fb

View File

@@ -44,6 +44,8 @@ Settings.getOne = async function (hash, field) {
Settings.set = async function (hash, values, quiet) {
quiet = quiet || false;
({ plugin: hash, settings: values, quiet } = await plugins.hooks.fire('filter:settings.set', { plugin: hash, settings: values, quiet }));
const sortedListData = {};
for (const key in values) {
if (values.hasOwnProperty(key)) {
@@ -55,8 +57,6 @@ Settings.set = async function (hash, values, quiet) {
}
const sortedLists = Object.keys(sortedListData);
({ plugin: hash, settings: values, quiet } = await plugins.hooks.fire('filter:settings.set', { plugin: hash, settings: values, quiet }));
if (sortedLists.length) {
await db.delete('settings:' + hash + ':sorted-lists');
await db.setAdd('settings:' + hash + ':sorted-lists', sortedLists);