add articleTitle to createHtmlContent method

This commit is contained in:
Chumva 2018-04-03 15:21:50 +03:00
parent 762c7062e2
commit 126b7003ad

View file

@ -147,8 +147,9 @@ public class WikivoyageArticleDialogFragment extends WikivoyageBaseDialogFragmen
private String createHtmlContent(WikivoyageArticle article) {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(HEADER_INNER);
if (!Algorithms.isEmpty(article.getImageTitle())) {
stringBuilder.append("<img class=\"title-image\" src=\"").append(WikivoyageArticle.getImageUrl(article.getImageTitle())).append("\"/>");
String articleTitle = article.getImageTitle();
if (!Algorithms.isEmpty(articleTitle)) {
stringBuilder.append("<img class=\"title-image\" src=\"").append(WikivoyageArticle.getImageUrl(articleTitle)).append("\"/>");
}
stringBuilder.append("<div class=\"main\">\n");
stringBuilder.append("<h1>").append(article.getTitle()).append("</h1>");