Fixing multi-word search queries on ios.

This commit is contained in:
Samuel Clay 2014-11-17 16:20:29 -08:00
parent ea961939a7
commit b3828b2b15

View file

@ -389,6 +389,7 @@
- (void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];
[self.searchBar resignFirstResponder];
[self.popoverController dismissPopoverAnimated:YES];
self.popoverController = nil;
UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
@ -458,6 +459,7 @@
appDelegate.activeStory = nil;
[storiesCollection setStories:nil];
[storiesCollection setFeedUserProfiles:nil];
storiesCollection.storyCount = 0;
if (!self.isDashboardModule) {
[appDelegate.storyPageControl resetPages];
}
@ -471,6 +473,7 @@
}
- (void)reloadStories {
appDelegate.hasLoadedFeedDetail = NO;
appDelegate.activeStory = nil;
[storiesCollection setStories:nil];
[storiesCollection setFeedUserProfiles:nil];
@ -642,7 +645,7 @@
if (appDelegate.inSearch && appDelegate.searchQuery) {
theFeedDetailURL = [NSString stringWithFormat:@"%@&query=%@",
theFeedDetailURL,
appDelegate.searchQuery];
[appDelegate.searchQuery stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
}
[self cancelRequests];
__weak ASIHTTPRequest *request = [self requestWithURL:theFeedDetailURL];
@ -851,7 +854,7 @@
if (appDelegate.inSearch && appDelegate.searchQuery) {
theFeedDetailURL = [NSString stringWithFormat:@"%@&query=%@",
theFeedDetailURL,
appDelegate.searchQuery];
[appDelegate.searchQuery stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
}
[self cancelRequests];