mirror of https://github.com/zulip/zulip.git
Streamline typeahead for stream links.
We don't need to get sorted streams in the "source" function for typeahead, since we sort them later, and we don't need to recalculate values. This preserves the behavior that we include unsubscribed streams in the typeahead, which is probably intentional.
This commit is contained in:
parent
132d0971ae
commit
51edcb02c8
|
@ -411,7 +411,7 @@ exports.compose_content_begins_typeahead = function (query) {
|
|||
|
||||
this.completing = 'stream';
|
||||
this.token = current_token;
|
||||
return stream_data.get_streams_for_settings_page();
|
||||
return stream_data.get_unsorted_subs();
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
|
|
@ -147,6 +147,10 @@ exports.get_non_default_stream_names = function () {
|
|||
return names;
|
||||
};
|
||||
|
||||
exports.get_unsorted_subs = function () {
|
||||
return stream_info.values();
|
||||
};
|
||||
|
||||
exports.subscribed_subs = function () {
|
||||
return _.where(stream_info.values(), {subscribed: true});
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue