mirror of
https://github.com/zulip/zulip.git
synced 2025-11-21 23:19:10 +00:00
Remove type parameter from build_narrow_filter().
The type parameter was always passed in as "stream", and we only render the stream_sidebar_row template, so let's not pretend like we support arbitrary message types here. (imported from commit 8a852a68ddda336024793f6fdafa648883bb815e)
This commit is contained in:
@@ -125,7 +125,7 @@ exports.set_in_home_view = function (stream, in_home) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function build_narrow_filter(name, type) {
|
function build_narrow_filter(name) {
|
||||||
var args = {name: name,
|
var args = {name: name,
|
||||||
id: subs.stream_id(name),
|
id: subs.stream_id(name),
|
||||||
uri: narrow.by_stream_uri(name),
|
uri: narrow.by_stream_uri(name),
|
||||||
@@ -135,7 +135,7 @@ function build_narrow_filter(name, type) {
|
|||||||
};
|
};
|
||||||
args.dark_background = stream_color.get_color_class(args.color);
|
args.dark_background = stream_color.get_color_class(args.color);
|
||||||
var list_item = $(templates.render('stream_sidebar_row', args));
|
var list_item = $(templates.render('stream_sidebar_row', args));
|
||||||
$("#" + type + "_filters").append(list_item);
|
$("#stream_filters").append(list_item);
|
||||||
return list_item;
|
return list_item;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,7 +144,7 @@ exports.add_stream_to_sidebar = function (stream_name) {
|
|||||||
// already exists
|
// already exists
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return build_narrow_filter(stream_name, 'stream');
|
return build_narrow_filter(stream_name);
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.get_stream_li = function (stream_name) {
|
exports.get_stream_li = function (stream_name) {
|
||||||
@@ -370,7 +370,7 @@ exports.update_dom_with_unread_counts = function (counts) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.rename_stream = function (sub) {
|
exports.rename_stream = function (sub) {
|
||||||
sub.sidebar_li = build_narrow_filter(sub.name, "stream");
|
sub.sidebar_li = build_narrow_filter(sub.name);
|
||||||
exports.build_stream_list(); // big hammer
|
exports.build_stream_list(); // big hammer
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user