Bug 1470049 - Partially revert rev 40f5ba35583 (bug 1385573) to fix insertion into threaded unified/search view. a=backout DONTBUILD
authorJorg K <jorgk@jorgk.com>
Wed, 28 Nov 2018 10:06:46 +0100
changeset 32941 9a840a138dbef9bb952620f827c1c9f36ee19246
parent 32940 b682f20af95a900492a0ac707000e93a86a537f3
child 32942 e5ce0ede4824625ab4dfa929f66dfcf37b86ba31
push id2343
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:37:21 +0000
treeherdercomm-beta@a0750c375f71 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1470049, 1385573
Bug 1470049 - Partially revert rev 40f5ba35583 (bug 1385573) to fix insertion into threaded unified/search view. a=backout DONTBUILD
mailnews/base/src/nsMsgSearchDBView.cpp
--- a/mailnews/base/src/nsMsgSearchDBView.cpp
+++ b/mailnews/base/src/nsMsgSearchDBView.cpp
@@ -637,17 +637,17 @@ void nsMsgSearchDBView::MoveThreadAt(nsM
   }
 
   nsMsgDBView::RemoveByIndex(threadIndex);
   m_folders.RemoveObjectAt(threadIndex);
   nsMsgViewIndex newIndex = GetIndexForThread(threadHdr);
   NS_ASSERTION(newIndex == m_levels.Length() ||
                (IsValidIndex(newIndex) && !m_levels[newIndex]),
                "inserting into middle of thread");
-  if (!IsValidIndex(newIndex))
+  if (newIndex == nsMsgViewIndex_None)
     newIndex = 0;
 
   nsMsgKey msgKey;
   uint32_t msgFlags;
   threadHdr->GetMessageKey(&msgKey);
   threadHdr->GetFlags(&msgFlags);
   InsertMsgHdrAt(newIndex, threadHdr, msgKey, msgFlags, 0);