Closed Bug 1042425 Opened 10 years ago Closed 10 years ago

Limit the number of history results shown during pre-load

Categories

(Firefox for Android Graveyard :: Search Activity, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 34

People

(Reporter: eedens, Assigned: Margaret)

References

Details

Attachments

(1 file)

We show search history cards when the search activity for loads. Right now it shows all history items -- there should be a sensible limit.

This will use the change from bug 1040994.
Depends on: 1040994
Sorry, I didn't notice that you were already assigned. Hopefully you don't already have a patch somewhere!

This was a bit annoying to test because MockHistoryProvider doesn't support limits, but I don't think it's worth updating that. This works with Fennec!
Assignee: eric.edens → margaret.leibovic
Attachment #8464904 - Flags: review?(eric.edens)
Comment on attachment 8464904 [details] [diff] [review]
Limit the number of search history results displayed

Review of attachment 8464904 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good -- let's pull out the constant before landing :)

::: mobile/android/search/java/org/mozilla/search/PreSearchFragment.java
@@ +40,5 @@
> +
> +    // Limit search history query results to 5 items. This value matches the number of search
> +    // suggestions we return in SearchFragment.
> +    private static final Uri SEARCH_HISTORY_URI =
> +            SearchHistory.CONTENT_URI.buildUpon().appendQueryParameter(BrowserContract.PARAM_LIMIT, "5").build();

Can we pull the `5` constant out from here and the code that fetches search suggestions into Constants.java?
Attachment #8464904 - Flags: review?(eric.edens) → review+
https://hg.mozilla.org/mozilla-central/rev/e15064c8ce6a
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 34
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: