From 4a215026515c5f4eddb74d6b665961686ebd5f43 Mon Sep 17 00:00:00 2001
From: M66B <259573+M66B@users.noreply.github.com>
Date: Sun, 5 May 2024 16:30:58 +0200
Subject: [PATCH] Added quick search button for hidden messages
---
.../eu/faircode/email/FragmentDialogSearch.java | 4 ++++
app/src/main/res/layout/dialog_search.xml | 14 +++++++++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/app/src/main/java/eu/faircode/email/FragmentDialogSearch.java b/app/src/main/java/eu/faircode/email/FragmentDialogSearch.java
index 8859e036b4..0c4d361d90 100644
--- a/app/src/main/java/eu/faircode/email/FragmentDialogSearch.java
+++ b/app/src/main/java/eu/faircode/email/FragmentDialogSearch.java
@@ -101,6 +101,7 @@ public class FragmentDialogSearch extends FragmentDialogBase {
final ImageButton ibInfo = dview.findViewById(R.id.ibInfo);
final ImageButton ibFlagged = dview.findViewById(R.id.ibFlagged);
final ImageButton ibUnseen = dview.findViewById(R.id.ibUnseen);
+ final ImageButton ibHidden = dview.findViewById(R.id.ibHidden);
final ImageButton ibInvite = dview.findViewById(R.id.ibInvite);
final ImageButton ibAttachment = dview.findViewById(R.id.ibAttachment);
final ImageButton ibNotes = dview.findViewById(R.id.ibNotes);
@@ -585,6 +586,8 @@ public class FragmentDialogSearch extends FragmentDialogBase {
criteria.with_flagged = true;
else if (id == R.id.ibUnseen)
criteria.with_unseen = true;
+ else if (id == R.id.ibHidden)
+ criteria.with_hidden = true;
else if (id == R.id.ibInvite) {
criteria.with_attachments = true;
criteria.with_types = new String[]{"text/calendar"};
@@ -606,6 +609,7 @@ public class FragmentDialogSearch extends FragmentDialogBase {
ibNotes.setOnClickListener(onClick);
ibAttachment.setOnClickListener(onClick);
ibInvite.setOnClickListener(onClick);
+ ibHidden.setOnClickListener(onClick);
ibUnseen.setOnClickListener(onClick);
ibFlagged.setOnClickListener(onClick);
diff --git a/app/src/main/res/layout/dialog_search.xml b/app/src/main/res/layout/dialog_search.xml
index 4eba9a19f5..33166392be 100644
--- a/app/src/main/res/layout/dialog_search.xml
+++ b/app/src/main/res/layout/dialog_search.xml
@@ -43,7 +43,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
- app:constraint_referenced_ids="ibFlagged,ibUnseen,ibInvite,ibAttachment,ibNotes"
+ app:constraint_referenced_ids="ibFlagged,ibUnseen,ibHidden,ibInvite,ibAttachment,ibNotes"
app:flow_horizontalBias="0"
app:flow_horizontalGap="12dp"
app:flow_horizontalStyle="packed"
@@ -76,6 +76,18 @@
app:srcCompat="@drawable/twotone_mail_24"
tools:ignore="MissingConstraints" />
+
+