Cleanup Sieve Filter edit, no need to reassign filters on save

This commit is contained in:
the-djmaze 2022-07-21 22:03:56 +02:00
parent cf71c1a18f
commit 6c4950615d

View file

@ -110,15 +110,7 @@ export class SieveScriptPopupView extends rl.pluginPopupView {
const clonedFilter = filter.assignTo(); const clonedFilter = filter.assignTo();
FilterPopupView.showModal([ FilterPopupView.showModal([
clonedFilter, clonedFilter,
() => { () => clonedFilter.assignTo(filter),
const script = this.script(),
filters = script.filters(),
index = filters.indexOf(filter);
if (-1 < index) {
clonedFilter.assignTo(filter);
script.filters(filters);
}
},
true true
]); ]);
} }