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 33792 9a840a138dbef9bb952620f827c1c9f36ee19246
parent 33791 b682f20af95a900492a0ac707000e93a86a537f3
child 33793 e5ce0ede4824625ab4dfa929f66dfcf37b86ba31
push id388
push userclokep@gmail.com
push dateMon, 28 Jan 2019 20:54:56 +0000
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);