Update WikivoyageArticleDialogFragment.java

This commit is contained in:
vshcherb 2018-05-02 15:32:44 +02:00 committed by GitHub
parent e2a170eeab
commit e4d97463ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -413,19 +413,16 @@ public class WikivoyageArticleDialogFragment extends WikivoyageBaseDialogFragmen
if (aggregatedPartOfArrayOrig.length > 0) {
String current = aggregatedPartOfArrayOrig[0];
sb.append("<div class=\"nav-bar"+nightModeClass+"\" onClick=\"showNavigation()\">");
if (aggregatedPartOfArrayOrig.length > 1) {
String[] aggregatedPartOfArray = new String[aggregatedPartOfArrayOrig.length - 1];
for (int i = 0; i < aggregatedPartOfArrayOrig.length - 1; i++) {
aggregatedPartOfArray[i] = aggregatedPartOfArrayOrig[aggregatedPartOfArrayOrig.length - i - 1];
if (aggregatedPartOfArrayOrig.length > 0) {
for (int i = aggregatedPartOfArrayOrig.length - 1; i >= 0 ; i--) {
if (i > 1) {
sb.append("").append(aggregatedPartOfArrayOrig[i]);
} else {
if (!TextUtils.isEmpty(current)) {
sb.append("<span class=\"nav-bar-current\">").append(current).append("</span>");
}
}
}
String navBarString = TextUtils.join("", aggregatedPartOfArray);
sb.append(navBarString);
}
if (!TextUtils.isEmpty(current)) {
if (aggregatedPartOfArrayOrig.length > 1) {
sb.append("");
}
sb.append("<span class=\"nav-bar-current\">").append(current).append("</span>");
}
sb.append("</div>");
}