From: Soren Stoutner Date: Tue, 14 Jan 2020 22:18:56 +0000 (-0700) Subject: Always reload tabs after changing the proxy. https://redmine.stoutner.com/issues/516 X-Git-Tag: v3.4~11 X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff_plain;h=c45e682700d98c6feb0a766e6b3b6665cc80d10e Always reload tabs after changing the proxy. https://redmine.stoutner.com/issues/516 --- diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java index 83bd942d..1904673b 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java @@ -2970,7 +2970,7 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook // Get a handle for the open dialog. Dialog openDialog = openDialogFragment.getDialog(); - // Remove the incorrect lint warning below tha tth edialog might be null. + // Remove the incorrect lint warning below that the dialog might be null. assert openDialog != null; // Get a handle for the file name edit text. @@ -3598,7 +3598,7 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook waitingForProxyDialogFragment.dismiss(); } - // Load any URLs that are waiting for the proxy. + // Reload existing URLs and load any URLs that are waiting for the proxy. for (int i = 0; i < webViewPagerAdapter.getCount(); i++) { // Get the WebView tab fragment. WebViewTabFragment webViewTabFragment = webViewPagerAdapter.getPageFragment(i); @@ -3615,12 +3615,15 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook String waitingForProxyUrlString = nestedScrollWebView.getWaitingForProxyUrlString(); // Load the pending URL if it exists. - if (!waitingForProxyUrlString.isEmpty()) { + if (!waitingForProxyUrlString.isEmpty()) { // A URL is waiting to be loaded. // Load the URL. loadUrl(nestedScrollWebView, waitingForProxyUrlString); // Reset the waiting for proxy URL string. nestedScrollWebView.resetWaitingForProxyUrlString(); + } else { // No URL is waiting to be loaded. + // Reload the existing URL. + nestedScrollWebView.reload(); } } }