Backed out changeset 7533feed2f23 for test failures.
authoraleth <aleth@instantbird.org>
Fri, 10 Jun 2016 11:32:57 +0200
changeset 25239 c89aaa727a7d3ec8199ecec7834875334bd1b097
parent 25238 4f9fcae55b38ab19cfbad2853cb22a896f8b2876
child 25240 bdf682a3f887eebe4511a326b3fe5e6861d0d7ca
push id1725
push userclokep@gmail.com
push dateMon, 19 Sep 2016 17:35:08 +0000
treeherdercomm-beta@6ead1abf3817 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
backs out7533feed2f235cdcde7f5adc7e729ad25d50cfce
Backed out changeset 7533feed2f23 for test failures.
calendar/base/modules/calViewUtils.jsm
--- a/calendar/base/modules/calViewUtils.jsm
+++ b/calendar/base/modules/calViewUtils.jsm
@@ -22,28 +22,25 @@ cal.view = {
 
         let bIsEvent = cal.isEvent(b);
         let bIsTodo = cal.isToDo(b);
 
         // sort todos before events
         if (aIsTodo && bIsEvent) return -1;
         if (aIsEvent && bIsTodo) return 1;
 
-        // sort items of the same type according to date-time
-        let aStartDate = a.startDate || a.entryDate || a.dueDate;
-        let bStartDate = b.startDate || b.entryDate || b.dueDate;
-        let aEndDate = a.endDate || a.dueDate || a.entryDate;
-        let bEndDate = b.endDate || b.dueDate || b.entryDate;
+        // todos are kept equal
+        if (aIsTodo && bIsTodo) return 0;
 
         // sort all day events before events with a duration
-        if (aStartDate.isDate && !bStartDate.isDate) return -1;
-        if (!aStartDate.isDate && bStartDate.isDate) return 1;
+        if (a.startDate.isDate && !b.startDate.isDate) return -1;
+        if (!a.startDate.isDate && b.startDate.isDate) return 1;
 
-        let cmp = aStartDate.compare(bStartDate);
+        let cmp = a.startDate.compare(b.startDate);
         if (cmp != 0) return cmp;
 
-        cmp = aEndDate.compare(bEndDate);
+        cmp = a.endDate.compare(b.endDate);
         if (cmp != 0) return cmp;
 
         cmp = (a.title > b.title) - (a.title < b.title);
         return cmp;
     }
 }