From 97429fd12856d9db00c078f0a07b5d361208eee7 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 19 Jun 2020 20:21:36 +0200 Subject: [PATCH] Allow searching on attachment name and type --- app/src/main/java/eu/faircode/email/DaoMessage.java | 4 +++- 1 file changed, 3 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 b61b8eb46b..a708db39cf 100644 --- a/app/src/main/java/eu/faircode/email/DaoMessage.java +++ b/app/src/main/java/eu/faircode/email/DaoMessage.java @@ -310,7 +310,9 @@ public interface DaoMessage { " OR (:recipients AND `bcc` LIKE :find COLLATE NOCASE)" + // no index " OR (:subject AND `subject` LIKE :find COLLATE NOCASE)" + // unsuitable index " OR (:keywords AND `keywords` LIKE :find COLLATE NOCASE)" + // no index - " OR (:message AND `preview` LIKE :find COLLATE NOCASE)) AS matched" + // no index + " OR (:message AND `preview` LIKE :find COLLATE NOCASE)" + + " OR (:attachments AND attachment.name LIKE :find COLLATE NOCASE)" + + " OR (:attachments AND attachment.type LIKE :find COLLATE NOCASE)) AS matched" + // no index " FROM message" + " LEFT JOIN attachment ON attachment.message = message.id" + " WHERE NOT ui_hide" +