Close UI and reload immediately when enabling global/tab restrictions or disabling them for the tab only.
This commit is contained in:
parent
41f9fcb8f4
commit
804782ef0c
|
@ -195,6 +195,11 @@ addEventListener("unload", e => {
|
|||
this.disabled = true;
|
||||
policy.enforced = !pressed;
|
||||
await UI.updateSettings({policy, reloadAffected: false});
|
||||
if (policy.enforced || UI.local.immediateUnrestrict) {
|
||||
reload();
|
||||
close();
|
||||
return;
|
||||
}
|
||||
setupEnforcement();
|
||||
pendingReload(true);
|
||||
};
|
||||
|
@ -216,6 +221,11 @@ addEventListener("unload", e => {
|
|||
reloadAffected: false,
|
||||
});
|
||||
UI.unrestrictedTab = pressed;
|
||||
if (!(UI.unrestrictedTab && UI.local.stickyUnrestrictedTab)) {
|
||||
reload();
|
||||
close();
|
||||
return;
|
||||
}
|
||||
setupEnforcement();
|
||||
pendingReload(true);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue