Permalink
Browse files

I am the Fixer

  • Loading branch information...
1 parent 8314f7d commit 1414443587fbc65c371325e2010bda28d4011410 Philip Messlehner committed Jan 19, 2010
Showing with 7 additions and 2 deletions.
  1. +1 −0 Classes/EditContextViewController.m
  2. +6 −2 Classes/Entities/Task.m
@@ -279,6 +279,7 @@ - (IBAction) save:(id)sender {
[contextView release];
[self dismissModalViewControllerAnimated:YES];
}
+ [BaseManagedObject commit];
}
- (IBAction) textFieldDone:(id)sender {
@@ -384,7 +384,7 @@ + (NSArray *) getTasksWithoutTag:(NSError **)error
+ (NSArray *) getTasksWithContext:(CLLocation *)theLocation error:(NSError **)error
{
NSMutableArray *result = [[NSMutableArray alloc] init];
- [result addObjectsFromArray:[Task getTasksWithFilterString:@"context != nil and context.gpsX != nil and context.gpsY != nil and isCompleted == NO and deleted == NO" error:error]];
+ [result addObjectsFromArray:[Task getTasksWithFilterString:@"context != nil and context.gpsX != nil and context.gpsY != nil and context.gpsY != 0 and context.gpsX != 0 and isCompleted == NO and deleted == NO" error:error]];
NSMutableArray *sorted = [[[NSMutableArray alloc] init] autorelease];
@@ -406,7 +406,11 @@ + (NSArray *) getTasksWithContext:(CLLocation *)theLocation error:(NSError **)er
[locNearest release];
[locTask release];
}
- [sorted addObject:[result objectAtIndex:nearest]];
+ if ([((Task *)[result objectAtIndex:nearest]).context hasGps]) {
+ ALog ("%@ - %@",((Task *)[result objectAtIndex:nearest]),((Task *)[result objectAtIndex:nearest]).context);
+ [sorted addObject:[result objectAtIndex:nearest]];
+ }
+
[result removeObjectAtIndex:nearest];
}

0 comments on commit 1414443

Please sign in to comment.