mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-16 07:00:14 -05:00
Fix JOIN-condition when searching for messages
This commit is contained in:
parent
60bf3e7e29
commit
2e1d25118a
@ -967,7 +967,7 @@ public class LocalStore extends Store implements Serializable {
|
||||
String[] selectionArgs = queryArgs.toArray(EMPTY_STRING_ARRAY);
|
||||
|
||||
String sqlQuery = "SELECT " + GET_MESSAGES_COLS + "FROM messages " +
|
||||
"LEFT JOIN folders ON (folders.id = messages.id) WHERE " +
|
||||
"LEFT JOIN folders ON (folders.id = messages.folder_id) WHERE " +
|
||||
"((empty IS NULL OR empty != 1) AND deleted = 0)" +
|
||||
((!StringUtils.isNullOrEmpty(where)) ? " AND (" + where + ")" : "") +
|
||||
" ORDER BY date DESC";
|
||||
|
Loading…
Reference in New Issue
Block a user