navbar: Use a more semantic selector in colorize_tab_bar().

Previously, this bit of code was looking for specific icons on the
navbar, but it's more semantic to just look for the `.fa` which is a
direct child of `.stream`. It also makes the code cleaner, to have a
single call here.
This commit is contained in:
YashRE42 2020-06-15 22:20:36 +00:00 committed by Tim Abbott
parent 6766b0ab43
commit b0b53c8543
1 changed files with 1 additions and 3 deletions

View File

@ -51,9 +51,7 @@ exports.colorize_tab_bar = function () {
const filter = narrow_state.filter();
if (filter === undefined || !filter.has_operator('stream') || !filter._stream_params) {return;}
const color_for_stream = stream_data.get_color(filter._stream_params._stream_name);
$("#tab_list .fa-hashtag").css('color', color_for_stream);
$("#tab_list .fa-lock").css('color', color_for_stream);
$("#tab_list .fa-globe").css('color', color_for_stream);
$("#tab_list .stream > .fa").css('color', color_for_stream);
};
function append_and_display_title_area(tab_bar_data) {