From edf4d56982d9bb4467c8eb668c148caeab5798d1 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 6 Feb 2022 16:22:16 +0100 Subject: [PATCH] Small optimization --- app/src/main/java/eu/faircode/email/MessageHelper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/MessageHelper.java b/app/src/main/java/eu/faircode/email/MessageHelper.java index 7dee2763ce..94e22749c3 100644 --- a/app/src/main/java/eu/faircode/email/MessageHelper.java +++ b/app/src/main/java/eu/faircode/email/MessageHelper.java @@ -1475,7 +1475,9 @@ public class MessageHelper { List all = new ArrayList<>(refs); all.add(msgid); - List infos = db.message().getThreadInfo(account, all); + List infos = (all.size() == 0 + ? new ArrayList<>() + : db.message().getThreadInfo(account, all)); // References, In-Reply-To (sent before) for (TupleThreadInfo info : infos)