Limit thread search range

This commit is contained in:
M66B
2022-03-09 17:35:19 +01:00
parent 88d4b5cf66
commit e5ec014a6a
3 changed files with 12 additions and 9 deletions

View File

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