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

This commit is contained in:
Anthony Restaino 2014-08-14 21:10:26 -04:00
parent f5de4626ef
commit e4cf9af26a

View File

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