Do not always convert removed stock list into imported list

If the removed stock list is labelled a "bad list", do not
convert it into an imported list.

This will allow to seamlessly merge resource-abuse stock list
with privacy stock list when 1.42.0 is widespread.
This commit is contained in:
Raymond Hill 2022-03-18 13:27:07 -04:00
parent 53a0d1ec5f
commit 34cca8349b
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 3 additions and 1 deletions

View File

@ -645,7 +645,8 @@ self.addEventListener('hiddenSettingsChanged', ( ) => {
io.registerAssetSource(listKey, entry);
}
// Convert a no longer existing stock list into an imported list.
// Convert a no longer existing stock list into an imported list, except
// when the removed stock list is deemed a "bad list".
const customListFromStockList = assetKey => {
const oldEntry = oldAvailableLists[assetKey];
if ( oldEntry === undefined || oldEntry.off === true ) { return; }
@ -653,6 +654,7 @@ self.addEventListener('hiddenSettingsChanged', ( ) => {
if ( Array.isArray(listURL) ) {
listURL = listURL[0];
}
if ( this.badLists.has(listURL) ) { return; }
const newEntry = {
content: 'filters',
contentURL: listURL,