mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-06 00:45:09 +00:00
Fix sorting of contacts with nil values
This commit is contained in:
@@ -31,6 +31,11 @@
|
||||
firstObject = [self count] > 0 ? [self objectAtIndex: 0] : nil;
|
||||
otherFirstObject = [otherRecord count] > 0 ? [otherRecord objectAtIndex: 0] : nil;
|
||||
|
||||
if (firstObject == nil)
|
||||
return NSOrderedAscending;
|
||||
else if (otherFirstObject == nil)
|
||||
return NSOrderedDescending;
|
||||
|
||||
return [firstObject compareCaseInsensitiveAscending: otherFirstObject];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user