From 522a598fefe3409a6a8fff474c116a8da2ae6920 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 10 Aug 2024 08:14:40 +0200 Subject: [PATCH] Start compose as new task always --- app/src/main/java/eu/faircode/email/ActivityCompose.java | 1 + app/src/main/java/eu/faircode/email/ActivityMain.java | 2 +- app/src/main/java/eu/faircode/email/ActivitySetup.java | 1 + app/src/main/java/eu/faircode/email/ActivityView.java | 2 ++ app/src/main/java/eu/faircode/email/AdapterAnswer.java | 1 + app/src/main/java/eu/faircode/email/AdapterMessage.java | 5 +++++ .../main/java/eu/faircode/email/FragmentDialogIdentity.java | 3 +++ app/src/main/java/eu/faircode/email/FragmentMessages.java | 5 +++++ app/src/main/java/eu/faircode/email/Log.java | 1 + app/src/main/java/eu/faircode/email/NotificationHelper.java | 2 +- 10 files changed, 21 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/ActivityCompose.java b/app/src/main/java/eu/faircode/email/ActivityCompose.java index 4bee0d8f8b..de2103a8f1 100644 --- a/app/src/main/java/eu/faircode/email/ActivityCompose.java +++ b/app/src/main/java/eu/faircode/email/ActivityCompose.java @@ -350,6 +350,7 @@ public class ActivityCompose extends ActivityBase implements FragmentManager.OnB context.startActivity( new Intent(context, ActivityCompose.class) + .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK) .putExtra("action", "edit") .putExtra("id", id)); } diff --git a/app/src/main/java/eu/faircode/email/ActivityMain.java b/app/src/main/java/eu/faircode/email/ActivityMain.java index 53b8494912..9fcafd9acc 100644 --- a/app/src/main/java/eu/faircode/email/ActivityMain.java +++ b/app/src/main/java/eu/faircode/email/ActivityMain.java @@ -281,7 +281,7 @@ public class ActivityMain extends ActivityBase implements FragmentManager.OnBack long composing = prefs.getLong("last_composing", -1L); if (ActivityCompose.class.getName().equals(last_activity) && composing >= 0) view = new Intent(ActivityMain.this, ActivityCompose.class) - .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) + .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK) .putExtra("action", "edit") .putExtra("id", composing); } diff --git a/app/src/main/java/eu/faircode/email/ActivitySetup.java b/app/src/main/java/eu/faircode/email/ActivitySetup.java index 61b33c50b5..a0cb9b87aa 100644 --- a/app/src/main/java/eu/faircode/email/ActivitySetup.java +++ b/app/src/main/java/eu/faircode/email/ActivitySetup.java @@ -517,6 +517,7 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac if (id == null) return; startActivity(new Intent(ActivitySetup.this, ActivityCompose.class) + .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK) .putExtra("action", "edit") .putExtra("id", id)); } diff --git a/app/src/main/java/eu/faircode/email/ActivityView.java b/app/src/main/java/eu/faircode/email/ActivityView.java index f026cd2edd..c1c44dd14f 100644 --- a/app/src/main/java/eu/faircode/email/ActivityView.java +++ b/app/src/main/java/eu/faircode/email/ActivityView.java @@ -1578,6 +1578,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB return; startActivity( new Intent(ActivityView.this, ActivityCompose.class) + .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK) .putExtra("action", "edit") .putExtra("id", id)); } @@ -2380,6 +2381,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB if (id == null) return; startActivity(new Intent(ActivityView.this, ActivityCompose.class) + .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK) .putExtra("action", "edit") .putExtra("id", id)); } diff --git a/app/src/main/java/eu/faircode/email/AdapterAnswer.java b/app/src/main/java/eu/faircode/email/AdapterAnswer.java index 23c03908da..8b2a95c8cc 100644 --- a/app/src/main/java/eu/faircode/email/AdapterAnswer.java +++ b/app/src/main/java/eu/faircode/email/AdapterAnswer.java @@ -196,6 +196,7 @@ public class AdapterAnswer extends RecyclerView.Adapter