From 8c9c3951cffa884dc8bac8da7041f94854d2f8b8 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 27 Dec 2018 11:38:34 +0000 Subject: [PATCH] Small improvements, cleanup --- app/src/main/java/eu/faircode/email/DaoMessage.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/DaoMessage.java b/app/src/main/java/eu/faircode/email/DaoMessage.java index 0b9cbd9562..efd4403b9c 100644 --- a/app/src/main/java/eu/faircode/email/DaoMessage.java +++ b/app/src/main/java/eu/faircode/email/DaoMessage.java @@ -160,6 +160,7 @@ public interface DaoMessage { @Query("SELECT id" + " FROM message" + " WHERE folder = :folder" + + " AND NOT ui_hide" + " ORDER BY message.received DESC") List getMessageByFolder(long folder); @@ -168,7 +169,8 @@ public interface DaoMessage { " WHERE account = :account" + " AND thread = :thread" + " AND (:id IS NULL OR message.id = :id)" + - " AND (:folder IS NULL OR message.folder = :folder)") + " AND (:folder IS NULL OR message.folder = :folder)" + + " AND NOT ui_hide") List getMessageByThread(long account, String thread, Long id, Long folder); @Query("SELECT message.* FROM message" + @@ -179,7 +181,8 @@ public interface DaoMessage { @Query("SELECT * FROM message" + " WHERE folder = :folder" + - " AND ui_seen") + " AND ui_seen" + + " AND NOT ui_hide") List getMessageSeen(long folder); @Query("SELECT id FROM message" + @@ -246,9 +249,6 @@ public interface DaoMessage { @Update int updateMessage(EntityMessage message); - @Query("UPDATE message SET uid = :uid WHERE id = :id") - int setMessageUid(long id, Long uid); - @Query("UPDATE message SET seen = :seen WHERE id = :id") int setMessageSeen(long id, boolean seen);