mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-21 22:32:45 +00:00
Monotone-Parent: a2e22f9ca9e5096f59327f5b4d176050ffcbf15f
Monotone-Revision: 00622e0c5fa34a4e5e98835bf4037dc6f562e342 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-11-22T16:19:11 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2007-11-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* iCalEntityObject.m ([iCalEntityObject -compare:otherObject]):
|
||||
safely compare between objects which may be nil.
|
||||
|
||||
2007-11-18 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* iCalPerson.m ([-rsvp]): return lowercase string.
|
||||
|
||||
@@ -425,13 +425,38 @@
|
||||
return nil; /* not found */
|
||||
}
|
||||
|
||||
- (NSComparisonResult) _compareValue: (id) selfValue
|
||||
withValue: (id) otherValue
|
||||
{
|
||||
NSComparisonResult result;
|
||||
|
||||
if (selfValue)
|
||||
{
|
||||
if (otherValue)
|
||||
result = [selfValue compare: otherValue];
|
||||
else
|
||||
result = NSOrderedDescending;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (otherValue)
|
||||
result = NSOrderedAscending;
|
||||
else
|
||||
result = NSOrderedSame;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
- (NSComparisonResult) _compareVersions: (iCalEntityObject *) otherObject
|
||||
{
|
||||
NSComparisonResult result;
|
||||
|
||||
result = [[self sequence] compare: [otherObject sequence]];
|
||||
result = [self _compareValue: [self sequence]
|
||||
withValue: [otherObject sequence]];
|
||||
if (result == NSOrderedSame)
|
||||
result = [[self lastModified] compare: [otherObject lastModified]];
|
||||
result = [self _compareValue: [self lastModified]
|
||||
withValue: [otherObject lastModified]];
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user