diff --git a/app/src/common/shared/org/mozilla/vrbrowser/browser/PermissionDelegate.java b/app/src/common/shared/org/mozilla/vrbrowser/browser/PermissionDelegate.java index 30f994abb..d0ee6f5a3 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/browser/PermissionDelegate.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/browser/PermissionDelegate.java @@ -20,6 +20,7 @@ import org.mozilla.vrbrowser.db.SitePermission; import org.mozilla.vrbrowser.ui.viewmodel.SitePermissionViewModel; import org.mozilla.vrbrowser.ui.widgets.WidgetManagerDelegate; +import org.mozilla.vrbrowser.ui.widgets.WindowWidget; import org.mozilla.vrbrowser.ui.widgets.dialogs.PermissionWidget; import org.mozilla.vrbrowser.utils.SystemUtils; import org.mozilla.vrbrowser.utils.UrlUtils; @@ -286,11 +287,20 @@ public void setPermissionAllowed(String uri, @SitePermission.Category int catego mSitePermissionModel.deleteSite(site); } else { if (site == null) { - site = new SitePermission(uri, false, SitePermission.SITE_PERMISSION_WEBXR); + site = new SitePermission(uri, false, category); mSitePermissions.add(site); } site.allowed = false; mSitePermissionModel.insertSite(site); } + + // Reload URIs with the same domain + for (WindowWidget window: mWidgetManager.getWindows().getCurrentWindows()) { + Session session = window.getSession(); + if (uri.equalsIgnoreCase(UrlUtils.getHost(session.getCurrentUri()))) { + session.reload(GeckoSession.LOAD_FLAGS_BYPASS_CACHE); + } + } + } } diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/NavigationBarWidget.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/NavigationBarWidget.java index f814501b9..a61c3941c 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/NavigationBarWidget.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/NavigationBarWidget.java @@ -1181,14 +1181,12 @@ private void toggleQuickPermission(UIButton target, @SitePermission.Category int public void onBlock() { SessionStore.get().setPermissionAllowed(uri, aCategory, false); mQuickPermissionWidget.onDismiss(); - mAttachedWindow.getSession().reload(); } @Override public void onAllow() { SessionStore.get().setPermissionAllowed(uri, aCategory, true); mQuickPermissionWidget.onDismiss(); - mAttachedWindow.getSession().reload(); } }); mQuickPermissionWidget.getPlacement().parentHandle = getHandle();