Skip to content

Commit

Permalink
fix(paused): update rules in managed mode even if paused state hasn't…
Browse files Browse the repository at this point in the history
… changed (#2140)
  • Loading branch information
smalluban authored Dec 11, 2024
1 parent d96b06d commit 5700693
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/background/paused.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ OptionsObserver.addListener('paused', async (paused, prevPaused) => {
// in the panel or the settings page.
if (
(__PLATFORM__ === 'chromium' || __PLATFORM__ === 'safari') &&
prevPaused
(prevPaused ||
// Managed mode can update the rules at any time - so we need to update
// the rules even if the paused state hasn't changed
(__PLATFORM__ === 'chromium' && (await store.resolve(Options).managed)))
) {
const removeRuleIds = (await chrome.declarativeNetRequest.getDynamicRules())
.filter(({ id }) => id <= 3)
Expand Down

0 comments on commit 5700693

Please sign in to comment.