fix filter removal

This commit is contained in:
buzz-lightsnack-2007 2024-04-14 13:07:21 +08:00
parent 2ddf2876cd
commit afd7fe1ee8

View file

@ -2,7 +2,7 @@
Manage filters. Manage filters.
*/ */
import {read, write} from "./secretariat.js"; import {read, write, forget} from "./secretariat.js";
import {download} from "./net.js"; import {download} from "./net.js";
import texts from "/gui/scripts/read.js"; import texts from "/gui/scripts/read.js";
import {Queue} from "./common.js"; import {Queue} from "./common.js";
@ -106,7 +106,7 @@ export default class filters {
*/ */
async remove(URL) { async remove(URL) {
if (URL.includes(`://`)) { if (URL.includes(`://`)) {
return (await forget([`filters`, URL], -1, false)) ? await forget([`settings`, `filters`, URL], 1, true) : false; await forget([`filters`, URL], -1, false) ? await forget([`settings`, `filters`, URL], 1, true) : false;
} else { } else {
// Inform the user of the removal being unnecessary. // Inform the user of the removal being unnecessary.
alerts.warn(texts.localized(`settings_filters_removal_stop`)); alerts.warn(texts.localized(`settings_filters_removal_stop`));