diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-05-24 13:30:34 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-06-15 13:30:55 +0200 |
commit | 1ef92b9d681e614d65b0ca0a2abdfd81a943e778 (patch) | |
tree | 840fc1720c86158dfff33566b2821f2075e38fc5 /common/mail/threadindexer.cpp | |
parent | 1963f3444e92932f3a31526dc91760d98d027bea (diff) | |
download | sink-1ef92b9d681e614d65b0ca0a2abdfd81a943e778.tar.gz sink-1ef92b9d681e614d65b0ca0a2abdfd81a943e778.zip |
Added threading index cleanup
Diffstat (limited to 'common/mail/threadindexer.cpp')
-rw-r--r-- | common/mail/threadindexer.cpp | 5 |
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 | ||
72 | void ThreadIndexer::remove(const ApplicationDomain::ApplicationDomainType &entity) | 72 | void 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 | ||
77 | QMap<QByteArray, int> ThreadIndexer::databases() | 80 | QMap<QByteArray, int> ThreadIndexer::databases() |