diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 2d92134d85..e156bd4576 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -3074,6 +3074,7 @@ class Core { thread.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); thread.putExtra("account", message.account); thread.putExtra("id", message.id); + thread.putExtra("filter_archive", !EntityFolder.ARCHIVE.equals(message.folderType)); piContent = PendingIntent.getActivity(context, ActivityView.REQUEST_THREAD, thread, PendingIntent.FLAG_UPDATE_CURRENT); } diff --git a/app/src/main/java/eu/faircode/email/ServiceUI.java b/app/src/main/java/eu/faircode/email/ServiceUI.java index 663bc4731b..2194e5e828 100644 --- a/app/src/main/java/eu/faircode/email/ServiceUI.java +++ b/app/src/main/java/eu/faircode/email/ServiceUI.java @@ -374,6 +374,7 @@ public class ServiceUI extends IntentService { private void onIgnore(long id, boolean open) { EntityMessage message; + EntityFolder folder; DB db = DB.getInstance(this); try { @@ -383,6 +384,10 @@ public class ServiceUI extends IntentService { if (message == null) return; + folder = db.folder().getFolder(message.folder); + if (folder == null) + return; + db.message().setMessageUiIgnored(message.id, true); db.setTransactionSuccessful(); @@ -396,6 +401,7 @@ public class ServiceUI extends IntentService { thread.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); thread.putExtra("account", message.account); thread.putExtra("id", message.id); + thread.putExtra("filter_archive", !EntityFolder.ARCHIVE.equals(folder.type)); startActivity(thread); } } diff --git a/app/src/main/java/eu/faircode/email/WidgetUnified.java b/app/src/main/java/eu/faircode/email/WidgetUnified.java index 0325b36780..8446339abc 100644 --- a/app/src/main/java/eu/faircode/email/WidgetUnified.java +++ b/app/src/main/java/eu/faircode/email/WidgetUnified.java @@ -71,6 +71,7 @@ public class WidgetUnified extends AppWidgetProvider { Intent thread = new Intent(context, ActivityView.class); thread.setAction("widget"); + thread.putExtra("filter_archive", !EntityFolder.ARCHIVE.equals(type)); thread.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); PendingIntent piItem = PendingIntent.getActivity( context, ActivityView.REQUEST_WIDGET, thread, PendingIntent.FLAG_UPDATE_CURRENT);