From 1ef92b9d681e614d65b0ca0a2abdfd81a943e778 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 24 May 2017 13:30:34 +0200 Subject: Added threading index cleanup --- common/mail/threadindexer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'common/mail/threadindexer.cpp') diff --git a/common/mail/threadindexer.cpp b/common/mail/threadindexer.cpp index ea2cf71..4171d85 100644 --- a/common/mail/threadindexer.cpp +++ b/common/mail/threadindexer.cpp @@ -71,7 +71,10 @@ void ThreadIndexer::modify(const ApplicationDomain::ApplicationDomainType &old, void ThreadIndexer::remove(const ApplicationDomain::ApplicationDomainType &entity) { - + auto messageId = entity.getProperty(Mail::MessageId::name); + auto thread = index().secondaryLookup(messageId); + index().unindex(messageId.toByteArray(), thread.first(), transaction()); + index().unindex(thread.first(), messageId.toByteArray(), transaction()); } QMap ThreadIndexer::databases() -- cgit v1.2.3