jenkins-bot has submitted this change and it was merged.
Change subject: Promote new search features to Production.
......................................................................
Promote new search features to Production.
Change-Id: Ie039b4c31f034fabcf2634da45009d3a05bdbf18
---
M wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
1 file changed, 14 insertions(+), 31 deletions(-)
Approvals:
BearND: Looks good to me, approved
jenkins-bot: Verified
diff --git
a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
index db4e4a4..4334659 100644
--- a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
+++ b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
@@ -250,16 +250,11 @@
openSearch();
}
- // TODO: remove this when ready for production
- if (app.getReleaseType() == WikipediaApp.RELEASE_PROD) {
+ if (TextUtils.isEmpty(term)) {
+ showPanel(PANEL_RECENT_SEARCHES);
+ } else if (getActivePanel() == PANEL_RECENT_SEARCHES) {
+ //start with title search...
showPanel(PANEL_TITLE_SEARCH);
- } else {
- if (TextUtils.isEmpty(term)) {
- showPanel(PANEL_RECENT_SEARCHES);
- } else if (getActivePanel() == PANEL_RECENT_SEARCHES) {
- //start with title search...
- showPanel(PANEL_TITLE_SEARCH);
- }
}
if (!TextUtils.isEmpty(lastSearchedText) && !TextUtils.isEmpty(term)) {
@@ -296,24 +291,16 @@
// show ourselves
searchContainerView.setVisibility(View.VISIBLE);
- // TODO: remove this when ready for production
- if (app.getReleaseType() == WikipediaApp.RELEASE_PROD) {
- fullSearchDisabled = true;
- //show title search by default...
- showPanel(PANEL_TITLE_SEARCH);
+ // find out whether full-text search has been disabled remotely, and
+ // hide the title/full switcher buttons accordingly.
+ fullSearchDisabled = app.getRemoteConfig().getConfig()
+ .optBoolean("disableFullTextSearch", false);
- } else {
- // find out whether full-text search has been disabled remotely,
and
- // hide the title/full switcher buttons accordingly.
- fullSearchDisabled = app.getRemoteConfig().getConfig()
- .optBoolean("disableFullTextSearch", false);
-
- // if the current search string is empty, then it's a fresh start,
so we'll show
- // recent searches by default. Otherwise, the currently-selected
panel should already
- // be visible, so we don't need to do anything.
- if (TextUtils.isEmpty(lastSearchedText)) {
- showPanel(PANEL_RECENT_SEARCHES);
- }
+ // if the current search string is empty, then it's a fresh start, so
we'll show
+ // recent searches by default. Otherwise, the currently-selected panel
should already
+ // be visible, so we don't need to do anything.
+ if (TextUtils.isEmpty(lastSearchedText)) {
+ showPanel(PANEL_RECENT_SEARCHES);
}
}
@@ -326,11 +313,7 @@
// hide ourselves
searchContainerView.setVisibility(View.GONE);
Utils.hideSoftKeyboard(getActivity());
-
- // TODO: remove this when ready for production
- if (app.getReleaseType() != WikipediaApp.RELEASE_PROD) {
- addRecentSearch(lastSearchedText);
- }
+ addRecentSearch(lastSearchedText);
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/184683
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie039b4c31f034fabcf2634da45009d3a05bdbf18
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant <[email protected]>
Gerrit-Reviewer: BearND <[email protected]>
Gerrit-Reviewer: Brion VIBBER <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits