From 44e3e7c5312e232c35403b5f8ad7cae0b4e6ddee Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 20 Dec 2016 00:17:00 +0100 Subject: Fix threading for non-threaded messages. Ensure we always have a messageId to work with, and avoid grouping all non-threaded messages together. --- common/domain/mail.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'common/domain') diff --git a/common/domain/mail.cpp b/common/domain/mail.cpp index 6926711..3dd9093 100644 --- a/common/domain/mail.cpp +++ b/common/domain/mail.cpp @@ -59,8 +59,10 @@ void TypeImplementation::configure(IndexPropertyMapper &indexPropertyMappe indexPropertyMapper.addIndexLookupProperty([](TypeIndex &index, const ApplicationDomain::BufferAdaptor &entity) { auto messageId = entity.getProperty(Mail::MessageId::name); auto thread = index.secondaryLookup(messageId); - Q_ASSERT(!thread.isEmpty()); - return thread.first(); + if (!thread.isEmpty()) { + return thread.first(); + } + return QByteArray{}; }); } -- cgit v1.2.3