Skip to content

Commit

Permalink
Simplify Agenda query
Browse files Browse the repository at this point in the history
  • Loading branch information
nevenz committed Jan 7, 2018
1 parent bc450ee commit 2a30e9b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,8 @@ public static CursorLoader getLoaderForSearch(Context context, String query) thr
}

public static CursorLoader getLoaderForAgenda(Context context, String query) throws SQLException {
return getLoaderForQuery(context, query, DatabaseUtils.WHERE_EXISTING_NOTES + " AND " + DatabaseUtils.WHERE_NOTES_WITH_TIMES);
String selection = DatabaseUtils.WHERE_EXISTING_NOTES + " AND " + DatabaseUtils.WHERE_NOTES_WITH_TIMES;
return getLoaderForQuery(context, query, selection);
}

private static CursorLoader getLoaderForQuery(Context context, String query, String selection) throws SQLException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class DbSearch implements DbSearchColumns, BaseColumns {
IS_SAVED + " INTEGER DEFAULT 0)",

"INSERT INTO " + TABLE + " (" + NAME + ", " + QUERY + ") VALUES " +
"(\"Agenda\", \".it.done (s.7d or d.7d) ad.7\")",
"(\"Agenda\", \".it.done ad.7\")",

"INSERT INTO " + TABLE + " (" + NAME + ", " + QUERY + ") VALUES " +
"(\"Scheduled\", \"s.today .it.done\")",
Expand Down

0 comments on commit 2a30e9b

Please sign in to comment.