From e7f179c90d94be6bb1ead7e973334802021b2619 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 17 Nov 2019 12:53:51 +0100 Subject: [PATCH] Added special search for encrypted messages --- .../java/eu/faircode/email/BoundaryCallbackMessages.java | 8 ++++++-- app/src/main/java/eu/faircode/email/DaoMessage.java | 6 +++++- app/src/main/java/eu/faircode/email/SearchViewEx.java | 1 + app/src/main/res/values/strings.xml | 1 + 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/BoundaryCallbackMessages.java b/app/src/main/java/eu/faircode/email/BoundaryCallbackMessages.java index fb96ee4c44..f935052d63 100644 --- a/app/src/main/java/eu/faircode/email/BoundaryCallbackMessages.java +++ b/app/src/main/java/eu/faircode/email/BoundaryCallbackMessages.java @@ -169,6 +169,7 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback matchMessages(Long folder, String find, Boolean seen, Boolean flagged, Boolean hidden, int limit, int offset); + List matchMessages( + Long folder, String find, + Boolean seen, Boolean flagged, Boolean hidden, Boolean encrypted, + int limit, int offset); @Query("SELECT id" + " FROM message" + diff --git a/app/src/main/java/eu/faircode/email/SearchViewEx.java b/app/src/main/java/eu/faircode/email/SearchViewEx.java index 805114dde4..542d9858db 100644 --- a/app/src/main/java/eu/faircode/email/SearchViewEx.java +++ b/app/src/main/java/eu/faircode/email/SearchViewEx.java @@ -63,6 +63,7 @@ public class SearchViewEx extends SearchView { cursor.addRow(new Object[]{-2, prefix + ":" + getContext().getString(R.string.title_search_special_unseen)}); cursor.addRow(new Object[]{-3, prefix + ":" + getContext().getString(R.string.title_search_special_flagged)}); cursor.addRow(new Object[]{-4, prefix + ":" + getContext().getString(R.string.title_search_special_snoozed)}); + cursor.addRow(new Object[]{-5, prefix + ":" + getContext().getString(R.string.title_search_special_encrypted)}); SimpleCursorAdapter adapter = new SimpleCursorAdapter( getContext(), R.layout.search_suggestion, diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1b50e8c7c4..5acdd19470 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -967,6 +967,7 @@ unread starred hidden + encrypted New message count Message list