Bug 819340 - gloda is disabled on trash when message is moved there, r=jcranmer, a=rkent
authorR Kent James <rkent@caspia.com>
Sun, 22 Feb 2015 13:35:20 -0800
changeset 20145 5088537f44509037d261be757a0d5c9b289dec23
parent 20144 e26fc5019f843040c3c5dc197af81e6c4c8dd751
child 20146 4db053e8db19054066da29e8bb637a382bcae0a6
child 20148 4776fcd9d1d6481a9860a4caf5539e528bc5d08b
push id45
push userkent@caspia.com
push dateThu, 26 Mar 2015 21:14:15 +0000
treeherdercomm-esr31@5088537f4450 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjcranmer, rkent
bugs819340
Bug 819340 - gloda is disabled on trash when message is moved there, r=jcranmer, a=rkent
mailnews/db/gloda/modules/index_msg.js
--- a/mailnews/db/gloda/modules/index_msg.js
+++ b/mailnews/db/gloda/modules/index_msg.js
@@ -2782,16 +2782,20 @@ var GlodaMsgIndexer = {
      * then get their flags added to them.
      */
     OnItemIntPropertyChanged: function gloda_indexer_OnItemIntPropertyChanged(
                                 aFolderItem, aProperty, aOldValue, aNewValue) {
       if (aProperty !== this._kFolderFlagAtom)
         return;
       if (!GlodaMsgIndexer.shouldIndexFolder(aFolderItem))
         return;
+      // Only reset priority if folder Special Use changes.
+      if ((aOldValue & Ci.nsMsgFolderFlags.SpecialUse) ==
+          (aNewValue & Ci.nsMsgFolderFlags.SpecialUse))
+        return;
       GlodaMsgIndexer.resetFolderIndexingPriority(aFolderItem);
     },
     OnItemBoolPropertyChanged: function gloda_indexer_OnItemBoolPropertyChanged(
                                 aItem, aProperty, aOldValue, aNewValue) {
     },
     OnItemUnicharPropertyChanged:
         function gloda_indexer_OnItemUnicharPropertyChanged(
           aItem, aProperty, aOldValue, aNewValue) {