Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2018-04-03 10:07:00 +02:00
commit 05dc721fab
2 changed files with 10 additions and 1 deletions

View file

@ -65,7 +65,8 @@ public class WikivoyageDbHelper {
SEARCH_TABLE_NAME + "." + SEARCH_COL_CITY_ID + ", " +
SEARCH_COL_ARTICLE_TITLE + ", " +
SEARCH_TABLE_NAME + "." + SEARCH_COL_LANG + ", " +
ARTICLES_COL_IS_PART_OF +
ARTICLES_COL_IS_PART_OF + ", " +
ARTICLES_COL_IMAGE_TITLE +
" FROM " + SEARCH_TABLE_NAME +
" JOIN " + ARTICLES_TABLE_NAME +
" ON " + SEARCH_TABLE_NAME + "." + SEARCH_COL_ARTICLE_TITLE + " = " + ARTICLES_TABLE_NAME + "." + ARTICLES_COL_TITLE +
@ -185,6 +186,7 @@ public class WikivoyageDbHelper {
res.articleTitles.add(cursor.getString(2));
res.langs.add(cursor.getString(3));
res.isPartOf = cursor.getString(4);
res.imageTitle = cursor.getString(5);
return res;
}

View file

@ -17,6 +17,7 @@ public class WikivoyageSearchResult implements Parcelable {
List<String> articleTitles = new ArrayList<>();
List<String> langs = new ArrayList<>();
String isPartOf;
String imageTitle;
WikivoyageSearchResult() {
@ -28,6 +29,7 @@ public class WikivoyageSearchResult implements Parcelable {
articleTitles = in.createStringArrayList();
langs = in.createStringArrayList();
isPartOf = in.readString();
imageTitle = in.readString();
}
public List<String> getSearchTerms() {
@ -50,6 +52,10 @@ public class WikivoyageSearchResult implements Parcelable {
return isPartOf;
}
public String getImageTitle() {
return imageTitle;
}
public String getFirstLangsString() {
StringBuilder res = new StringBuilder();
int limit = Math.min(SHOW_LANGS, langs.size());
@ -74,6 +80,7 @@ public class WikivoyageSearchResult implements Parcelable {
dest.writeStringList(articleTitles);
dest.writeStringList(langs);
dest.writeString(isPartOf);
dest.writeString(imageTitle);
}
public static final Creator<WikivoyageSearchResult> CREATOR = new Creator<WikivoyageSearchResult>() {