Skip to content

Commit

Permalink
Oops
Browse files Browse the repository at this point in the history
  • Loading branch information
M66B committed Mar 11, 2022
1 parent a5eef36 commit 9cbc990
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/eu/faircode/email/DaoMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,8 @@ List<Long> getMessageUnseen(
@Query("SELECT thread, msgid, hash, inreplyto FROM message" +
" WHERE account = :account" +
" AND (msgid IN (:msgids) OR inreplyto IN (:msgids))" +
" AND (:from IS NULL || received > :from)" +
" AND (:to IS NULL || received < :to)")
" AND (:from IS NULL OR received IS NULL OR received > :from)" +
" AND (:to IS NULL OR received IS NULL OR received < :to)")
List<TupleThreadInfo> getThreadInfo(long account, List<String> msgids, Long from, Long to);

@Query("SELECT * FROM message" +
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/eu/faircode/email/MessageHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -1489,8 +1489,8 @@ private String _getThreadIdAlt(Context context, long account, long folder, long

int thread_range = prefs.getInt("thread_range", MessageHelper.DEFAULT_THREAD_RANGE);
int range = (int) Math.pow(2, thread_range);
Long start = (received == 0 ? null : received - range * 24 * 3600L);
Long end = (received == 0 ? null : received + range * 24 * 3600L);
Long start = (received == 0 ? null : received - range * 24 * 3600 * 1000L);
Long end = (received == 0 ? null : received + range * 24 * 3600 * 1000L);

List<TupleThreadInfo> infos = (all.size() == 0
? new ArrayList<>()
Expand Down

0 comments on commit 9cbc990

Please sign in to comment.