// Set the display webpage images mode.
setDisplayWebpageImages();
- // Only reload `mainWebView` if not loading a new intent.
- if (!loadingNewIntentBoolean) {
+ // Only reload `mainWebView` if not loading a new intent and not waiting for Orbot.
+ if (!loadingNewIntentBoolean && !waitingForOrbot) {
// Reload the webpage to remove images if `setDisplayWebpageImages` has turned them off.
mainWebView.reload();
- } else {
- // Reset `loadingNewIntentBoolean`.
+ } else if (loadingNewIntentBoolean) { // Reset `loadingNewIntentBoolean` if this run comes from a new intent.
loadingNewIntentBoolean = false;
}
}
DownloadManager.Request downloadRequest = new DownloadManager.Request(Uri.parse(imageUrl));
// Pass cookies to download manager if cookies are enabled. This is required to download images from websites that require a login.
+ // Code contributed 2017 Hendrik Knackstedt. Copyright assigned to Soren Stoutner <soren@stoutner.com>.
if (firstPartyCookiesEnabled) {
// Get the cookies for `imageUrl`.
String cookies = cookieManager.getCookie(imageUrl);
DownloadManager.Request downloadRequest = new DownloadManager.Request(Uri.parse(downloadUrl));
// Pass cookies to download manager if cookies are enabled. This is required to download files from websites that require a login.
+ // Code contributed 2017 Hendrik Knackstedt. Copyright assigned to Soren Stoutner <soren@stoutner.com>.
if (firstPartyCookiesEnabled) {
// Get the cookies for `downloadUrl`.
String cookies = cookieManager.getCookie(downloadUrl);