Start compose as new task always

pull/215/head
M66B 2 months ago
parent 80e77659a0
commit 522a598fef

@ -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));
}

@ -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);
}

@ -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));
}

@ -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));
}

@ -196,6 +196,7 @@ public class AdapterAnswer extends RecyclerView.Adapter<AdapterAnswer.ViewHolder
private void onActionCompose() {
context.startActivity(new Intent(context, ActivityCompose.class)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
.putExtra("action", "new")
.putExtra("answer", answer.id));
}

@ -3672,6 +3672,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
private void onReply() {
Intent reply = new Intent(context, ActivityCompose.class)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
.putExtra("action", "reply")
.putExtra("reference", message.id)
.putExtra("text", action.getTextReply());
@ -4265,6 +4266,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
Helper.share(context, (File) result, "text/calendar", status + ".ics");
else {
Intent reply = new Intent(context, ActivityCompose.class)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
.putExtra("action", "participation")
.putExtra("reference", args.getLong("id"))
.putExtra("ics", (File) result)
@ -4688,6 +4690,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
!EntityMessage.SMIME_SIGNENCRYPT.equals(message.encrypt)) {
context.startActivity(
new Intent(context, ActivityCompose.class)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
.putExtra("action", "edit")
.putExtra("id", message.id));
properties.setValue("selected", message.id, true);
@ -5322,6 +5325,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ToastEx.makeText(context, R.string.title_legend_receipt, Toast.LENGTH_LONG).show();
else {
Intent reply = new Intent(context, ActivityCompose.class)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
.putExtra("action", "dsn")
.putExtra("dsn", EntityMessage.DSN_RECEIPT)
.putExtra("reference", message.id);
@ -5509,6 +5513,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
!EntityMessage.SMIME_SIGNENCRYPT.equals(message.encrypt))
context.startActivity(
new Intent(context, ActivityCompose.class)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
.putExtra("action", "edit")
.putExtra("id", message.id));
else {

@ -74,6 +74,7 @@ public class FragmentDialogIdentity extends FragmentDialogBase {
if (tag != null && !tag.equals(position)) {
TupleIdentityEx identity = (TupleIdentityEx) spIdentity.getAdapter().getItem(position);
startActivity(new Intent(v.getContext(), ActivityCompose.class)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
.putExtra("action", "new")
.putExtra("account", identity.account)
.putExtra("identity", identity.id)
@ -201,6 +202,7 @@ public class FragmentDialogIdentity extends FragmentDialogBase {
TupleIdentityEx identity = (TupleIdentityEx) spIdentity.getSelectedItem();
if (identity != null)
startActivity(new Intent(context, ActivityCompose.class)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
.putExtra("action", "new")
.putExtra("account", identity.account)
.putExtra("identity", identity.id)
@ -257,6 +259,7 @@ public class FragmentDialogIdentity extends FragmentDialogBase {
fragment.show(manager, "identity:select");
} else
context.startActivity(new Intent(context, ActivityCompose.class)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
.putExtra("action", "new")
.putExtra("account", account)
.putExtra("identity", args.getLong("identity", -1L)));

@ -4045,6 +4045,7 @@ public class FragmentMessages extends FragmentBase
public boolean onMenuItemClick(MenuItem target) {
if (target.getGroupId() == Menu.FIRST) {
startActivity(new Intent(context, ActivityCompose.class)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
.putExtra("action", "reply")
.putExtra("reference", message.id)
.putExtra("answer", target.getIntent().getLongExtra("id", -1)));
@ -4121,6 +4122,7 @@ public class FragmentMessages extends FragmentBase
selected = null;
Intent reply = new Intent(context, ActivityCompose.class)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
.putExtra("action", action)
.putExtra("reference", message.id)
.putExtra("selected", selected);
@ -4225,6 +4227,7 @@ public class FragmentMessages extends FragmentBase
private void onMenuDsn(TupleMessageEx message, int type) {
Intent reply = new Intent(getContext(), ActivityCompose.class)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
.putExtra("action", "dsn")
.putExtra("reference", message.id)
.putExtra("dsn", type);
@ -4233,6 +4236,7 @@ public class FragmentMessages extends FragmentBase
private void onMenuNew(TupleMessageEx message, Address[] to) {
Intent reply = new Intent(getContext(), ActivityCompose.class)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
.putExtra("action", "new")
.putExtra("identity", message.identity == null ? -1 : message.identity)
.putExtra("to", MessageHelper.formatAddressesCompose(to));
@ -4276,6 +4280,7 @@ public class FragmentMessages extends FragmentBase
}
startActivity(new Intent(context, ActivityCompose.class)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
.putExtra("action", "reply")
.putExtra("reference", message.id)
.putExtra("answer", intent.getLongExtra("id", -1)));

@ -1947,6 +1947,7 @@ public class Log {
return;
context.startActivity(new Intent(context, ActivityCompose.class)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
.putExtra("action", "edit")
.putExtra("id", id));
}

@ -1198,7 +1198,7 @@ class NotificationHelper {
.putExtra("action", "reply")
.putExtra("reference", message.id)
.putExtra("group", group);
reply.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
reply.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
PendingIntent piReply = PendingIntentCompat.getActivity(
context, ActivityCompose.PI_REPLY, reply, PendingIntent.FLAG_UPDATE_CURRENT);
NotificationCompat.Action.Builder actionReply = new NotificationCompat.Action.Builder(

Loading…
Cancel
Save