Fix failing stream sidebar node test

(imported from commit 3187a8f34389bf1f0b37e80edec9fb56f7281306)
This commit is contained in:
Allen Rabinovich
2014-02-18 11:47:37 -07:00
parent d0572f50fb
commit 7822be5cd9
2 changed files with 8 additions and 2 deletions

View File

@@ -152,6 +152,7 @@ exports.add_stream_to_sidebar = function (stream_name) {
exports.redraw_stream_privacy = function (stream_name) {
var li = exports.get_stream_li(stream_name);
var div = li.find('.stream-privacy');
var swatch = li.find('.streamlist_swatch');
var sub = stream_data.get_sub(stream_name);
var color = stream_data.get_color(stream_name);
var dark_background = stream_color.get_color_class(color);
@@ -161,6 +162,13 @@ exports.redraw_stream_privacy = function (stream_name) {
dark_background: dark_background
};
if (sub.invite_only) {
swatch.addClass("private-stream-swatch");
}
else {
swatch.removeClass("private-stream-swatch");
}
var html = templates.render('stream_privacy', args);
div.html(html);
};