X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Factivities%2FMainWebViewActivity.java;h=4cef681385533e224a1d58f4aba192f63d784a45;hp=83bd942d518e6e1fc82bacfbc50c069998529bfc;hb=a87ea266a0df9aca50f9bc8a58066a4c962ea515;hpb=b235ba52731f112015d9058ade4c5a66abf7ed5c 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..4cef6813 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java @@ -1,5 +1,5 @@ /* - * Copyright © 2015-2019 Soren Stoutner . + * Copyright © 2015-2020 Soren Stoutner . * * Download cookie code contributed 2017 Hendrik Knackstedt. Copyright assigned to Soren Stoutner . * @@ -2940,6 +2940,7 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook // Get a handle for the file name edit text. EditText fileNameEditText = saveWebpageDialog.findViewById(R.id.file_name_edittext); + TextView fileExistsWarningTextView = saveWebpageDialog.findViewById(R.id.file_exists_warning_textview); // Instantiate the file name helper. FileNameHelper fileNameHelper = new FileNameHelper(); @@ -2954,6 +2955,9 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook // Move the cursor to the end of the file name edit text. fileNameEditText.setSelection(fileNamePath.length()); + + // Hide the file exists warning. + fileExistsWarningTextView.setVisibility(View.GONE); } } } @@ -2970,7 +2974,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 +3602,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 +3619,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(); } } }