Rename sort_narrow_list() to build_stream_list().

(imported from commit 533dbe4171b859077c496f656f8c2476107b318c)
This commit is contained in:
Steve Howell
2013-11-22 14:05:34 -05:00
parent 9a68022516
commit 688cc4963c
2 changed files with 6 additions and 5 deletions

View File

@@ -6,7 +6,7 @@ var last_private_message_count = 0;
var last_mention_count = 0;
var previous_sort_order;
exports.sort_narrow_list = function () {
exports.build_stream_list = function () {
var streams = stream_data.subscribed_streams();
if (streams.length === 0) {
return;
@@ -14,6 +14,7 @@ exports.sort_narrow_list = function () {
var sort_recent = (streams.length > 40);
streams.sort(function (a, b) {
if (sort_recent) {
if (recent_subjects.has(b) && ! recent_subjects.has(a)) {
@@ -237,7 +238,7 @@ function rebuild_recent_subjects(stream, active_topic) {
}
exports.update_streams_sidebar = function () {
exports.sort_narrow_list();
exports.build_stream_list();
if (! narrow.active()) {
return;
@@ -324,7 +325,7 @@ exports.update_dom_with_unread_counts = function (counts) {
exports.rename_stream = function (sub) {
sub.sidebar_li = build_narrow_filter(sub.name, "stream");
exports.sort_narrow_list(); // big hammer
exports.build_stream_list(); // big hammer
};
$(function () {
@@ -386,7 +387,7 @@ $(function () {
if (li) {
event.sub.sidebar_li = li;
}
exports.sort_narrow_list();
exports.build_stream_list();
});
$(document).on('subscription_remove_done.zulip', function (event) {

View File

@@ -361,7 +361,7 @@ function populate_subscriptions(subs, subscribed) {
sub_rows.push(sub);
});
stream_list.sort_narrow_list();
stream_list.build_stream_list();
return sub_rows;
}