add check for downloading images in saved articles

This commit is contained in:
Chumva 2018-04-12 17:35:33 +03:00
parent 4ea5ab16db
commit 743f5dcdf3
2 changed files with 3 additions and 1 deletions

View file

@ -120,6 +120,7 @@ public class WikivoyageArticleDialogFragment extends WikivoyageBaseDialogFragmen
contentWebView = (WebView) mainView.findViewById(R.id.content_web_view);
contentWebView.getSettings().setJavaScriptEnabled(true);
contentWebView.getSettings().setLoadsImagesAutomatically(getSettings().SHOW_WEBVIEW_IMAGES.get());
return mainView;
}

View file

@ -78,7 +78,8 @@ public class SavedArticlesRvAdapter extends RecyclerView.Adapter<RecyclerView.Vi
boolean lastItem = position == getItemCount() - 1;
Picasso.get()
.load(WikivoyageArticle.getImageUrl(article.getImageTitle(), false))
.load(app.getSettings().SHOW_WEBVIEW_IMAGES.get() ?
WikivoyageArticle.getImageUrl(article.getImageTitle(), false) : null)
.transform(USE_ALTERNATIVE_CARD ? new CropRectTransformation() : new CropCircleTransformation())
.into(holder.icon, new Callback() {
@Override