This commit is contained in:
M66B 2022-03-11 08:53:40 +01:00
parent a5eef36e47
commit 9cbc99018e
2 changed files with 4 additions and 4 deletions

View File

@ -425,8 +425,8 @@ public interface DaoMessage {
@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" +

View File

@ -1489,8 +1489,8 @@ public class MessageHelper {
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<>()