Skip to content

Commit

Permalink
(fix) make sure we return event blocks sorted by start date (#2939)
Browse files Browse the repository at this point in the history
  • Loading branch information
extrafu committed May 13, 2015
1 parent dc48e05 commit 39aa9a9
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion UI/Scheduler/UIxCalListingActions.m
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@
#define maxBlocks (offsetBlocks * 2) // maximum number of blocks to search
// for a free slot (10 days)

@implementation NSArray (SOGoBlocksCompare)

- (NSComparisonResult) compareBlock: (NSArray *) theOtherBlock
{
return [[self objectAtIndex: 5] compare: [theOtherBlock objectAtIndex: 5]];
}

@end

@implementation UIxCalListingActions

+ (void) initialize
Expand Down Expand Up @@ -483,7 +492,9 @@ - (NSArray *) _fetchFields: (NSArray *) fields
}
}
}


[infos sortUsingSelector: @selector(compareBlock:)];

return infos;
}

Expand Down

0 comments on commit 39aa9a9

Please sign in to comment.