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 25733 8a0c1e39ec46d54517aadf4c57606cb9543db1c0
parent 25732 f80ed9184e2d24ab2cb90a00ef3b3648192db57c
child 25734 2b629bdb2ba35707717de499a488525ad23a2a88
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [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) {