Fix small issue with index in wikivoyage search

This commit is contained in:
Alexander Sytnyk 2018-03-30 13:12:41 +03:00
parent cde978955c
commit 543915c0cb

View file

@ -87,7 +87,7 @@ public class WikivoyageDbHelper {
try { try {
for (int i = 0; i < cityIds.size(); i++) { for (int i = 0; i < cityIds.size(); i++) {
String dbQuery = SEARCH_TABLE_SELECT + " WHERE " + SEARCH_COL_CITY_ID + " = ?"; String dbQuery = SEARCH_TABLE_SELECT + " WHERE " + SEARCH_COL_CITY_ID + " = ?";
SQLiteCursor cursor = conn.rawQuery(dbQuery, new String[]{String.valueOf(cityIds.get(0))}); SQLiteCursor cursor = conn.rawQuery(dbQuery, new String[]{String.valueOf(cityIds.get(i))});
if (cursor.moveToFirst()) { if (cursor.moveToFirst()) {
do { do {
res.add(readSearchResult(cursor)); res.add(readSearchResult(cursor));