pull/207/head
M66B 4 years ago
parent a5eef36e47
commit 9cbc99018e

@ -425,8 +425,8 @@ public interface DaoMessage {
@Query("SELECT thread, msgid, hash, inreplyto FROM message" + @Query("SELECT thread, msgid, hash, inreplyto FROM message" +
" WHERE account = :account" + " WHERE account = :account" +
" AND (msgid IN (:msgids) OR inreplyto IN (:msgids))" + " AND (msgid IN (:msgids) OR inreplyto IN (:msgids))" +
" AND (:from IS NULL || received > :from)" + " AND (:from IS NULL OR received IS NULL OR received > :from)" +
" AND (:to IS NULL || received < :to)") " AND (:to IS NULL OR received IS NULL OR received < :to)")
List<TupleThreadInfo> getThreadInfo(long account, List<String> msgids, Long from, Long to); List<TupleThreadInfo> getThreadInfo(long account, List<String> msgids, Long from, Long to);
@Query("SELECT * FROM message" + @Query("SELECT * FROM message" +

@ -1489,8 +1489,8 @@ public class MessageHelper {
int thread_range = prefs.getInt("thread_range", MessageHelper.DEFAULT_THREAD_RANGE); int thread_range = prefs.getInt("thread_range", MessageHelper.DEFAULT_THREAD_RANGE);
int range = (int) Math.pow(2, thread_range); int range = (int) Math.pow(2, thread_range);
Long start = (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 * 3600L); Long end = (received == 0 ? null : received + range * 24 * 3600 * 1000L);
List<TupleThreadInfo> infos = (all.size() == 0 List<TupleThreadInfo> infos = (all.size() == 0
? new ArrayList<>() ? new ArrayList<>()

Loading…
Cancel
Save