From 16d276959a550d326a561f44259af02f242d65fa Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 12 Sep 2017 08:48:36 +0200 Subject: Avoid reindexing the same thread --- common/mail/threadindexer.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'common') 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 if (!parentThread.isEmpty()) { auto childThreadId = thread.first(); auto parentThreadId = parentThread.first(); + //Can happen if the message is already available locally. + if (childThreadId == parentThreadId) { + //Nothing to do + return; + } SinkTrace() << "Merging child thread: " << childThreadId << " into parent thread: " << parentThreadId; //Ensure this mail ends up in the correct thread -- cgit v1.2.3