From b8d611802b5803dabb3b0357ab8ffd31bfdf166a Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 12 Feb 2020 11:28:45 +0100 Subject: [PATCH] Reset preview on resetting content --- app/src/main/java/eu/faircode/email/DaoMessage.java | 2 +- 1 file changed, 1 insertion(+), 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 f4a4d39542..c9730827d4 100644 --- a/app/src/main/java/eu/faircode/email/DaoMessage.java +++ b/app/src/main/java/eu/faircode/email/DaoMessage.java @@ -533,7 +533,7 @@ public interface DaoMessage { int setMessageRevisions(long id, Integer revisions); @Query("UPDATE message" + - " SET content = :content, fts = 0" + + " SET content = :content, fts = 0, preview = CASE WHEN :content THEN preview ELSE NULL END" + " WHERE id = :id") int setMessageContent(long id, boolean content);