Keep browsed messages

This commit is contained in:
M66B
2019-01-19 16:09:52 +00:00
parent 078af01b17
commit 0c01bec194
2 changed files with 4 additions and 3 deletions

View File

@@ -257,7 +257,8 @@ public interface DaoMessage {
@Query("SELECT uid FROM message" +
" WHERE folder = :folder" +
" AND (:received IS NULL OR received >= :received)" +
" AND NOT uid IS NULL")
" AND NOT uid IS NULL" +
" AND NOT ui_browsed")
List<Long> getUids(long folder, Long received);
@Query("SELECT * FROM message WHERE NOT ui_snoozed IS NULL")
@@ -352,7 +353,8 @@ public interface DaoMessage {
@Query("DELETE FROM message" +
" WHERE folder = :folder" +
" AND uid IS NULL")
" AND uid IS NULL" +
" AND NOT ui_browsed")
int deleteOrphans(long folder);
@Query("DELETE FROM message" +