Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Save list just once when deleting to avoid glitches (#3322)
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo authored May 4, 2020
1 parent 653ce1c commit 0adafe3
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,17 @@ public void remove(@NonNull SitePermission permission) {

public void removeAll() {
// We can't use clearExceptionList as that clears also the private browsing exceptions
mSitePermissions.forEach(this::remove);
mSitePermissions.forEach(permission -> {
ContentBlockingException exception = toContentBlockingException(permission);
if (exception != null) {
mContentBlockingController.removeException(exception);
}
mListeners.forEach(listener -> listener.onExcludedTrackingProtectionChange(
permission.url,
false,
false));
});
saveExceptions();
}

private void saveExceptions() {
Expand Down

0 comments on commit 0adafe3

Please sign in to comment.