// Check to see if the storage permission is needed.
if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) { // The storage permission has been granted.
// Check to see if the storage permission is needed.
if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) { // The storage permission has been granted.
@@ -3769,7+3765,7 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
@Override
public void navigateHistory(String url, int steps) {
// Apply the domain settings.
@Override
public void navigateHistory(String url, int steps) {
@@ -4311,6+4307,11 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
if (reloadWebsite) {
nestedScrollWebView.reload();
}
if (reloadWebsite) {
nestedScrollWebView.reload();
}
+
+ // Load the URL if directed. This makes sure that the domain settings are properly loaded before the URL. By using `loadUrl()`, instead of `loadUrlFromBase()`, the Referer header will never be sent.
// Get the current URL from the nested scroll WebView. This is more accurate than using the URL passed into the method, which is sometimes not the final one.
String currentUrl = nestedScrollWebView.getUrl();
// Get the current URL from the nested scroll WebView. This is more accurate than using the URL passed into the method, which is sometimes not the final one.
String currentUrl = nestedScrollWebView.getUrl();
@@ -6359,7+6351,7 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
inputMethodManager.showSoftInput(urlEditText, 0);
// Apply the domain settings. This clears any settings from the previous domain.
inputMethodManager.showSoftInput(urlEditText, 0);
// Apply the domain settings. This clears any settings from the previous domain.