summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-09-12 08:48:36 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-09-12 08:48:36 +0200
commit16d276959a550d326a561f44259af02f242d65fa (patch)
treeb54b27b7ab0825321586b5ab27b1bb713600897b
parente9a996fadd625f20382486ff4a2c2408aabbf82e (diff)
downloadsink-16d276959a550d326a561f44259af02f242d65fa.tar.gz
sink-16d276959a550d326a561f44259af02f242d65fa.zip
Avoid reindexing the same thread
-rw-r--r--common/mail/threadindexer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/mail/threadindexer.cpp b/common/mail/threadindexer.cpp
index 1401fc8..68f7af7 100644
--- a/common/mail/threadindexer.cpp
+++ b/common/mail/threadindexer.cpp
@@ -46,6 +46,11 @@ void ThreadIndexer::updateThreadingIndex(const QByteArray &identifier, const App
46 if (!parentThread.isEmpty()) { 46 if (!parentThread.isEmpty()) {
47 auto childThreadId = thread.first(); 47 auto childThreadId = thread.first();
48 auto parentThreadId = parentThread.first(); 48 auto parentThreadId = parentThread.first();
49 //Can happen if the message is already available locally.
50 if (childThreadId == parentThreadId) {
51 //Nothing to do
52 return;
53 }
49 SinkTrace() << "Merging child thread: " << childThreadId << " into parent thread: " << parentThreadId; 54 SinkTrace() << "Merging child thread: " << childThreadId << " into parent thread: " << parentThreadId;
50 55
51 //Ensure this mail ends up in the correct thread 56 //Ensure this mail ends up in the correct thread