From be9f97342bb17f54182136a54e8eb59eab1ac757 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 2 Jun 2008 20:05:38 +0000 Subject: [PATCH] Monotone-Parent: 935cf293ec636367ef64469ec9130956087caa1e Monotone-Revision: 76a822505adea00b3bf98056aa500f08ba7e35b7 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-06-02T20:05:38 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 13 +++++++++++++ UI/MailPartViewers/UIxMailPartICalActions.m | 2 +- UI/MailPartViewers/UIxMailPartICalViewer.m | 7 +++++++ .../MailPartViewers/UIxMailPartICalViewer.wox | 2 +- 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5ddbfd576..7e5a34c6c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2008-06-02 Wolfgang Sourdeau + + * UI/MailPartViewers/UIxMailPartICalViewer.m + ([UIxMailPartICalViewer -canOriginalEventBeUpdated]): new template + accessor that return whether the use status has changed in the + original reply and if its sequence number concurs. + + * UI/MailPartViewers/UIxMailPartICalActions.m + ([UIxMailPartICalActions -updateUserStatusAction]): we accept the + modification if the sequence number from the reply is equal or + SUPERIOR (for Lightning bugs), rather than inferior, where the + reply is obsolete anyway. + 2008-05-31 Wolfgang Sourdeau * SoObjects/Mailer/SOGoMailFolder.m ([SOGoMailFolder diff --git a/UI/MailPartViewers/UIxMailPartICalActions.m b/UI/MailPartViewers/UIxMailPartICalActions.m index 6d91a5fcd..77cd6e767 100644 --- a/UI/MailPartViewers/UIxMailPartICalActions.m +++ b/UI/MailPartViewers/UIxMailPartICalActions.m @@ -319,7 +319,7 @@ eventObject = [self _eventObjectWithUID: [emailEvent uid]]; calendarEvent = [eventObject component: NO secure: NO]; if (([[emailEvent sequence] compare: [calendarEvent sequence]] - != NSOrderedDescending) + != NSOrderedAscending) && ([self _updateParticipantStatusInEvent: calendarEvent fromEvent: emailEvent inObject: eventObject])) diff --git a/UI/MailPartViewers/UIxMailPartICalViewer.m b/UI/MailPartViewers/UIxMailPartICalViewer.m index 66df01d20..52481cc66 100644 --- a/UI/MailPartViewers/UIxMailPartICalViewer.m +++ b/UI/MailPartViewers/UIxMailPartICalViewer.m @@ -416,4 +416,11 @@ != NSOrderedSame); } +- (BOOL) canOriginalEventBeUpdated +{ + return ([self hasSenderStatusChanged] + && ([[inEvent sequence] compare: [storedEvent sequence]] + != NSOrderedAscending)); +} + @end /* UIxMailPartICalViewer */ diff --git a/UI/Templates/MailPartViewers/UIxMailPartICalViewer.wox b/UI/Templates/MailPartViewers/UIxMailPartICalViewer.wox index d4f58af6e..91ba11468 100644 --- a/UI/Templates/MailPartViewers/UIxMailPartICalViewer.wox +++ b/UI/Templates/MailPartViewers/UIxMailPartICalViewer.wox @@ -84,7 +84,7 @@ -