mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-10 11:03:41 +02:00
Added mailto account context
This commit is contained in:
@@ -183,6 +183,12 @@ public class ActivityCompose extends ActivityBase implements FragmentManager.OnB
|
||||
args.putString("bcc", address.get(0));
|
||||
else if ("in-reply-to".equalsIgnoreCase(key))
|
||||
args.putString("inreplyto", address.get(0));
|
||||
else if ("aid".equals(key))
|
||||
try {
|
||||
args.putLong("account", Long.parseLong(address.get(0)));
|
||||
} catch (Throwable ex) {
|
||||
Log.w(ex);
|
||||
}
|
||||
}
|
||||
|
||||
String body = mailto.getBody();
|
||||
@@ -313,8 +319,9 @@ public class ActivityCompose extends ActivityBase implements FragmentManager.OnB
|
||||
if (isShared(action)) {
|
||||
intent.putExtra("fair:shared", true);
|
||||
args.putString("action", "new");
|
||||
args.putLong("account",
|
||||
intent.getLongExtra("fair:account", -1L));
|
||||
if (!args.containsKey("account"))
|
||||
args.putLong("account",
|
||||
intent.getLongExtra("fair:account", -1L));
|
||||
}
|
||||
|
||||
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
|
||||
|
||||
@@ -6762,9 +6762,17 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
}.execute(context, owner, args, "message:external");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if ("cid".equals(uri.getScheme()) || "data".equals(uri.getScheme()))
|
||||
} else if ("mailto".equals(scheme)) {
|
||||
TupleMessageEx message = getMessage();
|
||||
if (message != null) {
|
||||
String mailto = uri.toString();
|
||||
if (mailto.indexOf('?') < 0)
|
||||
mailto += "?aid=" + message.account;
|
||||
else
|
||||
mailto += "&aid=" + message.account;
|
||||
uri = Uri.parse(mailto);
|
||||
}
|
||||
} else if ("cid".equals(scheme) || "data".equals(uri.getScheme()))
|
||||
return false;
|
||||
|
||||
boolean confirm_links = prefs.getBoolean("confirm_links", true);
|
||||
|
||||
Reference in New Issue
Block a user