Reset preview on resetting content

pull/174/head
M66B 5 years ago
parent 6f490c15d2
commit b8d611802b

@ -533,7 +533,7 @@ public interface DaoMessage {
int setMessageRevisions(long id, Integer revisions); int setMessageRevisions(long id, Integer revisions);
@Query("UPDATE message" + @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") " WHERE id = :id")
int setMessageContent(long id, boolean content); int setMessageContent(long id, boolean content);

Loading…
Cancel
Save