diff --git a/app/src/main/java/eu/faircode/email/ActivityMain.java b/app/src/main/java/eu/faircode/email/ActivityMain.java index 8882e7941b..7fc71b6dcc 100644 --- a/app/src/main/java/eu/faircode/email/ActivityMain.java +++ b/app/src/main/java/eu/faircode/email/ActivityMain.java @@ -66,12 +66,18 @@ public class ActivityMain extends ActivityBase implements FragmentManager.OnBack if (path == null) return null; String[] parts = path.split("/"); - if (parts.length < 1) + if (parts.length < 3) return null; - long id = Long.parseLong(parts[1]); + + long account = Long.parseLong(parts[1]); + String msgid = parts[2]; DB db = DB.getInstance(context); - return db.message().getMessage(id); + List messages = db.message().getMessagesByMsgId(account, msgid); + if (messages == null || messages.size() == 0) + return null; + + return messages.get(0); } @Override diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index 5a21d4fc50..2aec4fd688 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -4825,13 +4825,11 @@ public class AdapterMessage extends RecyclerView.Adapter'; } + String getLink() { + return "message://" + BuildConfig.APPLICATION_ID + "/" + this.account + "/" + Uri.encode(this.msgid); + } + boolean replySelf(List identities, long account) { Address[] senders = (reply == null || reply.length == 0 ? from : reply); if (identities != null && senders != null)