Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Commit

Permalink
Now searches vacancies for all the top keywords rather than top 2
Browse files Browse the repository at this point in the history
  • Loading branch information
castvoid committed Sep 10, 2014
1 parent 8fc3d09 commit 1c7f5c8
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions pinpoint2/PPVacanciesTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,8 @@ - (void)viewWillAppear:(BOOL)animated{
NSLog(@"No keywords...");
return;
}
NSString *favouriteKeyword = topKeywords[0];
NSString *secondFavouriteKeyword = topKeywords.count >=1 ? topKeywords[1] : nil;
if (favouriteKeyword == nil) {

} else {
if (secondFavouriteKeyword == nil){
[self searchForString:favouriteKeyword];
NSLog(@"Finding jobs for keyword '%@'",favouriteKeyword);
}else{
[self searchForString:[NSString stringWithFormat:@"%@ OR %@",favouriteKeyword,secondFavouriteKeyword]];
NSLog(@"Finding jobs for keywords '%@' and '%@'", favouriteKeyword, secondFavouriteKeyword);
}
}
NSString *searchString = [topKeywords componentsJoinedByString:@" OR "];
[self searchForString:searchString];
}
}

Expand Down

0 comments on commit 1c7f5c8

Please sign in to comment.