mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 19:52:17 -05:00
Make LocalStore.searchForMessages() skip empty messages
This commit is contained in:
parent
613ef6ced2
commit
d703286833
@ -976,8 +976,10 @@ public class LocalStore extends Store implements Serializable {
|
||||
}
|
||||
|
||||
// build sql query
|
||||
String sqlQuery = "SELECT " + GET_MESSAGES_COLS + "FROM messages WHERE deleted = 0 "
|
||||
+ (search.getConditions() != null ? "AND (" + search.getConditions() + ")" : "") + " ORDER BY date DESC";
|
||||
ConditionsTreeNode conditions = search.getConditions();
|
||||
String sqlQuery = "SELECT " + GET_MESSAGES_COLS + "FROM messages WHERE " +
|
||||
"((empty IS NULL OR empty != 1) AND deleted = 0)" +
|
||||
((conditions != null) ? " AND (" + conditions + ")" : "") + " ORDER BY date DESC";
|
||||
|
||||
if (K9.DEBUG) {
|
||||
Log.d(K9.LOG_TAG, "Query = " + sqlQuery);
|
||||
|
Loading…
Reference in New Issue
Block a user