From 369bc02f45ec6a832bc6df1c73d9f484e74ba358 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Mon, 22 Jul 2013 16:31:06 -0400 Subject: [PATCH] Limit people in search suggestions (imported from commit 655201100b3a9c39ffd053fd744938b5c5eb75dd) --- zephyr/static/js/search.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zephyr/static/js/search.js b/zephyr/static/js/search.js index be3dbd7fb9..3eaf354fb7 100644 --- a/zephyr/static/js/search.js +++ b/zephyr/static/js/search.js @@ -189,6 +189,9 @@ function get_private_suggestions(all_people, operators) { people.sort(typeahead_helper.compare_by_pms); + // Take top 15 people, since they're ordered by pm_recipient_count. + people = people.slice(0, 15); + var suggestions = $.map(people, function (person) { var name = highlight_person(query, person); var description = 'Narrow to private messages with ' + name;