Browse Source

Group on thread only

main
M66B 6 years ago
parent
commit
ccc42a77a8
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/src/main/java/eu/faircode/email/DaoMessage.java

+ 2
- 2
app/src/main/java/eu/faircode/email/DaoMessage.java View File

@ -43,7 +43,7 @@ public interface DaoMessage {
" FROM message" +
" JOIN folder ON folder.id = message.folder" +
" WHERE (NOT message.ui_hide OR :debug)" +
" GROUP BY CASE WHEN message.thread IS NULL THEN message.id ELSE message.thread END, message.subject" +
" GROUP BY CASE WHEN message.thread IS NULL THEN message.id ELSE message.thread END" +
" HAVING SUM(CASE WHEN folder.type = '" + EntityFolder.INBOX + "' THEN 1 ELSE 0 END) > 0" +
" ORDER BY message.received DESC")
DataSource.Factory<Integer, TupleMessageEx> pagedUnifiedInbox(boolean debug);
@ -57,7 +57,7 @@ public interface DaoMessage {
" JOIN folder ON folder.id = message.folder" +
" LEFT JOIN folder f ON f.id = :folder" +
" WHERE (NOT message.ui_hide OR :debug)" +
" GROUP BY CASE WHEN message.thread IS NULL THEN message.id ELSE message.thread END, message.subject" +
" GROUP BY CASE WHEN message.thread IS NULL THEN message.id ELSE message.thread END" +
" HAVING SUM(CASE WHEN folder.id = :folder THEN 1 ELSE 0 END) > 0" +
" ORDER BY message.received DESC, message.sent DESC")
DataSource.Factory<Integer, TupleMessageEx> pagedFolder(long folder, boolean debug);


Loading…
Cancel
Save