Small optimization

This commit is contained in:
M66B
2022-02-06 16:22:16 +01:00
parent 7519eddfa2
commit edf4d56982

View File

@@ -1475,7 +1475,9 @@ public class MessageHelper {
List<String> all = new ArrayList<>(refs);
all.add(msgid);
List<TupleThreadInfo> infos = db.message().getThreadInfo(account, all);
List<TupleThreadInfo> infos = (all.size() == 0
? new ArrayList<>()
: db.message().getThreadInfo(account, all));
// References, In-Reply-To (sent before)
for (TupleThreadInfo info : infos)