mirror of https://github.com/zulip/zulip.git
Show more topics in search suggestions.
Search suggestions were limiting you to the last 10 topics in a stream, not the last 10 *matching* topics in a stream. This was just a bug, where the slice() call was supposed to come after the filter() call. (imported from commit 7ad8f8409315d8ca389aa5bb085275a60f6e08c0)
This commit is contained in:
parent
ca182ec062
commit
01f141e2b6
|
@ -324,14 +324,14 @@ function get_topic_suggestions(query_operators) {
|
|||
return topic.subject; // "subject" is just the name of the topic
|
||||
});
|
||||
|
||||
topics = topics.slice(0, 10);
|
||||
|
||||
if (guess !== '') {
|
||||
topics = _.filter(topics, function (topic) {
|
||||
return phrase_match(topic, guess);
|
||||
});
|
||||
}
|
||||
|
||||
topics = topics.slice(0, 10);
|
||||
|
||||
// Just use alphabetical order. While recency and read/unreadness of
|
||||
// subjects do matter in some contexts, you can get that from the left sidebar,
|
||||
// and I'm leaning toward high scannability for autocompletion. I also don't
|
||||
|
|
Loading…
Reference in New Issue