summaryrefslogtreecommitdiffstats
path: root/common/mail
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-05-24 13:30:34 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-06-15 13:30:55 +0200
commit1ef92b9d681e614d65b0ca0a2abdfd81a943e778 (patch)
tree840fc1720c86158dfff33566b2821f2075e38fc5 /common/mail
parent1963f3444e92932f3a31526dc91760d98d027bea (diff)
downloadsink-1ef92b9d681e614d65b0ca0a2abdfd81a943e778.tar.gz
sink-1ef92b9d681e614d65b0ca0a2abdfd81a943e778.zip
Added threading index cleanup
Diffstat (limited to 'common/mail')
-rw-r--r--common/mail/threadindexer.cpp5
1 files changed, 4 insertions, 1 deletions
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,
71 71
72void ThreadIndexer::remove(const ApplicationDomain::ApplicationDomainType &entity) 72void ThreadIndexer::remove(const ApplicationDomain::ApplicationDomainType &entity)
73{ 73{
74 74 auto messageId = entity.getProperty(Mail::MessageId::name);
75 auto thread = index().secondaryLookup<Mail::MessageId, Mail::ThreadId>(messageId);
76 index().unindex<Mail::MessageId, Mail::ThreadId>(messageId.toByteArray(), thread.first(), transaction());
77 index().unindex<Mail::ThreadId, Mail::MessageId>(thread.first(), messageId.toByteArray(), transaction());
75} 78}
76 79
77QMap<QByteArray, int> ThreadIndexer::databases() 80QMap<QByteArray, int> ThreadIndexer::databases()