[california] Account for calendar when comparing events



commit d6bb3123dccbf20c7be04a7045325f3df6adffed
Author: Jim Nelson <jim yorba org>
Date:   Wed Nov 5 18:26:26 2014 -0800

    Account for calendar when comparing events
    
    This can be an issue when an event is on multiple user calendars,
    i.e. both email addresses are listed as attendees.

 src/component/component-event.vala |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/component/component-event.vala b/src/component/component-event.vala
index ba1fde2..3f0734e 100644
--- a/src/component/component-event.vala
+++ b/src/component/component-event.vala
@@ -482,6 +482,13 @@ public class Event : Instance, Gee.Comparable<Event> {
         if (compare != 0)
             return compare;
         
+        // calendar source
+        if (calendar_source != null && other.calendar_source != null) {
+            compare = calendar_source.compare_to(other.calendar_source);
+            if (compare != 0)
+                return compare;
+        }
+        
         // stabilize with UIDs
         return uid.compare_to(other.uid);
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]