Mhurd has uploaded a new change for review.
https://gerrit.wikimedia.org/r/174857
Change subject: Clear search results if none were returned by the query.
......................................................................
Clear search results if none were returned by the query.
We were too aggressive about not blanking search results :)
Change-Id: I5889e5807e4d6270f4c254f8c27701e9b35b37e5
---
M wikipedia/View Controllers/SearchResults/SearchResultsController.m
1 file changed, 8 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia
refs/changes/57/174857/1
diff --git a/wikipedia/View Controllers/SearchResults/SearchResultsController.m
b/wikipedia/View Controllers/SearchResults/SearchResultsController.m
index 42cdbec..6cc22fb 100644
--- a/wikipedia/View Controllers/SearchResults/SearchResultsController.m
+++ b/wikipedia/View Controllers/SearchResults/SearchResultsController.m
@@ -309,6 +309,12 @@
[self fadeAlert];
break;
case FETCH_FINAL_STATUS_FAILED:
+
+ if(error.code == SEARCH_RESULT_ERROR_NO_MATCHES){
+ [self clearSearchResults];
+ [self.searchMessageLabel
showWithText:error.localizedDescription];
+ }
+
//[self.searchMessageLabel
showWithText:error.localizedDescription];
//[self showAlert:error.localizedDescription
type:ALERT_TYPE_MIDDLE duration:-1];
break;
@@ -405,6 +411,8 @@
[self scrollTableToTop];
[self.searchMessageLabel hide];
+
+ [self.didYouMeanButton hide];
// Show "Searching..." message.
//[self.searchMessageLabel
showWithText:MWLocalizedString(@"search-searching", nil)];
--
To view, visit https://gerrit.wikimedia.org/r/174857
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5889e5807e4d6270f4c254f8c27701e9b35b37e5
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits