mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-23 14:41:08 +00:00
Reply calendar status
This commit is contained in:
parent
df8a360541
commit
c7527618a9
2 changed files with 20 additions and 4 deletions
|
@ -1384,10 +1384,24 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onExecuted(Bundle args, File ics) {
|
protected void onExecuted(Bundle args, File ics) {
|
||||||
|
String status = null;
|
||||||
|
switch (action) {
|
||||||
|
case R.id.btnCalendarAccept:
|
||||||
|
status = context.getString(R.string.title_icalendar_accept);
|
||||||
|
break;
|
||||||
|
case R.id.btnCalendarDecline:
|
||||||
|
status = context.getString(R.string.title_icalendar_decline);
|
||||||
|
break;
|
||||||
|
case R.id.btnCalendarMaybe:
|
||||||
|
status = context.getString(R.string.title_icalendar_maybe);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
Intent reply = new Intent(context, ActivityCompose.class)
|
Intent reply = new Intent(context, ActivityCompose.class)
|
||||||
.putExtra("action", "participation")
|
.putExtra("action", "participation")
|
||||||
.putExtra("reference", args.getLong("id"))
|
.putExtra("reference", args.getLong("id"))
|
||||||
.putExtra("ics", ics);
|
.putExtra("ics", ics)
|
||||||
|
.putExtra("status", status);
|
||||||
context.startActivity(reply);
|
context.startActivity(reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -673,6 +673,7 @@ public class FragmentCompose extends FragmentBase {
|
||||||
args.putLong("account", a.getLong("account", -1));
|
args.putLong("account", a.getLong("account", -1));
|
||||||
args.putLong("reference", a.getLong("reference", -1));
|
args.putLong("reference", a.getLong("reference", -1));
|
||||||
args.putSerializable("ics", a.getSerializable("ics"));
|
args.putSerializable("ics", a.getSerializable("ics"));
|
||||||
|
args.putString("status", a.getString("status"));
|
||||||
args.putBoolean("raw", a.getBoolean("raw", false));
|
args.putBoolean("raw", a.getBoolean("raw", false));
|
||||||
args.putLong("answer", a.getLong("answer", -1));
|
args.putLong("answer", a.getLong("answer", -1));
|
||||||
args.putString("to", a.getString("to"));
|
args.putString("to", a.getString("to"));
|
||||||
|
@ -1943,6 +1944,7 @@ public class FragmentCompose extends FragmentBase {
|
||||||
long id = args.getLong("id", -1);
|
long id = args.getLong("id", -1);
|
||||||
long reference = args.getLong("reference", -1);
|
long reference = args.getLong("reference", -1);
|
||||||
File ics = (File) args.getSerializable("ics");
|
File ics = (File) args.getSerializable("ics");
|
||||||
|
String status = args.getString("status");
|
||||||
long answer = args.getLong("answer", -1);
|
long answer = args.getLong("answer", -1);
|
||||||
|
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
|
@ -2084,8 +2086,7 @@ public class FragmentCompose extends FragmentBase {
|
||||||
draft.thread = draft.msgid; // new thread
|
draft.thread = draft.msgid; // new thread
|
||||||
|
|
||||||
String subject = (ref.subject == null ? "" : ref.subject);
|
String subject = (ref.subject == null ? "" : ref.subject);
|
||||||
if ("reply".equals(action) || "reply_all".equals(action) ||
|
if ("reply".equals(action) || "reply_all".equals(action)) {
|
||||||
"participation".equals(action)) {
|
|
||||||
if (prefix_once) {
|
if (prefix_once) {
|
||||||
String re = context.getString(R.string.title_subject_reply, "");
|
String re = context.getString(R.string.title_subject_reply, "");
|
||||||
subject = subject.replaceAll("(?i)" + Pattern.quote(re.trim()), "").trim();
|
subject = subject.replaceAll("(?i)" + Pattern.quote(re.trim()), "").trim();
|
||||||
|
@ -2115,7 +2116,8 @@ public class FragmentCompose extends FragmentBase {
|
||||||
body = "<p>" + context.getString(R.string.title_receipt_text) + "</p>";
|
body = "<p>" + context.getString(R.string.title_receipt_text) + "</p>";
|
||||||
if (!Locale.getDefault().getLanguage().equals("en"))
|
if (!Locale.getDefault().getLanguage().equals("en"))
|
||||||
body += "<p>" + res.getString(R.string.title_receipt_text) + "</p>";
|
body += "<p>" + res.getString(R.string.title_receipt_text) + "</p>";
|
||||||
}
|
} else if ("participation".equals(action))
|
||||||
|
draft.subject = status + ": " + ref.subject;
|
||||||
|
|
||||||
draft.plain_only = ref.plain_only;
|
draft.plain_only = ref.plain_only;
|
||||||
if (answer > 0)
|
if (answer > 0)
|
||||||
|
|
Loading…
Reference in a new issue