Skip to content

Commit

Permalink
search foursquare only when not searching for an address
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Pavlovic committed Nov 27, 2013
1 parent ebdc77c commit 7d5cbe6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion APIQueue/SMAPIQueue.m
Expand Up @@ -37,10 +37,10 @@ - (void)sleepOperationBody; {

- (void)addTasks:(NSString *)srchString {
NSDictionary * d = [SMAddressParser parseAddress:srchString];
[self addFoursquareTask:@{@"params" : @{@"text" : srchString}}];
if ([d objectForKey:@"number"] == nil && [d objectForKey:@"city"] == nil && [d objectForKey:@"zip"] == nil) {
[self addKMSPlacesTask:@{@"params" : d}];
[self addKMSStreetTask:@{@"params" : d}];
[self addFoursquareTask:@{@"params" : @{@"text" : srchString}}];
} else {
[self addKMSAddressTask:@{@"params" : d}];
}
Expand Down

0 comments on commit 7d5cbe6

Please sign in to comment.