From 6d790c7d51781d430e3e4f98195243fae65e8fa9 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 12 Aug 2018 18:16:12 +0000 Subject: [PATCH] Do not mark messages in outbox read --- app/src/main/java/eu/faircode/email/DaoMessage.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/DaoMessage.java b/app/src/main/java/eu/faircode/email/DaoMessage.java index 9f67340546..0dad3f4235 100644 --- a/app/src/main/java/eu/faircode/email/DaoMessage.java +++ b/app/src/main/java/eu/faircode/email/DaoMessage.java @@ -83,7 +83,11 @@ public interface DaoMessage { @Query("SELECT * FROM message WHERE msgid = :msgid") EntityMessage getMessageByMsgId(String msgid); - @Query("SELECT * FROM message WHERE account = :account AND thread = :thread") + @Query("SELECT message.* FROM message" + + " JOIN folder ON folder.id = message.folder" + + " WHERE message.account = :account" + + " AND message.thread = :thread" + + " AND folder.type <> '" + EntityFolder.OUTBOX + "'") List getMessageByThread(long account, String thread); @Query("SELECT message.*, folder.name as folderName, folder.type as folderType" +