Browse Source

Search suggestions from history now match the URL as well as title

master
Anthony Restaino 10 years ago
parent
commit
e4cf9af26a
  1. 2
      src/acr/browser/lightning/DatabaseHandler.java

2
src/acr/browser/lightning/DatabaseHandler.java

@ -111,7 +111,7 @@ public class DatabaseHandler extends SQLiteOpenHelper {
List<HistoryItem> itemList = new ArrayList<HistoryItem>(); List<HistoryItem> itemList = new ArrayList<HistoryItem>();
// select query // select query
String selectQuery = "SELECT * FROM " + TABLE_HISTORY + " WHERE " + KEY_TITLE + " LIKE '%" String selectQuery = "SELECT * FROM " + TABLE_HISTORY + " WHERE " + KEY_TITLE + " LIKE '%"
+ search + "%'"; + search + "%' OR " + KEY_URL + " LIKE '%" + search + "%'";
Cursor cursor = mDatabase.rawQuery(selectQuery, null); Cursor cursor = mDatabase.rawQuery(selectQuery, null);
// looping through all rows and adding to list // looping through all rows and adding to list

Loading…
Cancel
Save