Originally, I added recent to blocklist object that's returned from API. It was designed to be able to add new domains to the blocklist without updating (and making user re-download) whole blocklist.
However, it only allows to add new domains to blocklist. Deleting a domain from whitelist, a reasonable operation that might have to be executed urgently, would force a re-download.
I changed it to recentlyAdded and recentlyRemoved. recentlyAdded blocks domains that are not in the bloom filter. recentlyRemoved unblocks domain that are in the bloom filter.
Tests are failing expectedly, since we haven't deployed the new mock API yet.
Originally, I added
recent
to blocklist object that's returned from API. It was designed to be able to add new domains to the blocklist without updating (and making user re-download) whole blocklist.However, it only allows to add new domains to blocklist. Deleting a domain from whitelist, a reasonable operation that might have to be executed urgently, would force a re-download.
I changed it to
recentlyAdded
andrecentlyRemoved
.recentlyAdded
blocks domains that are not in the bloom filter.recentlyRemoved
unblocks domain that are in the bloom filter.Tests are failing expectedly, since we haven't deployed the new mock API yet.