topic list: Remove unnecessary markup.

The data attribute here has some value if you're
inspecting the HTML in the browser, but it's not
worth the extra code.

All the list items have data-stream-id, so there's
no need for the parent to have it.
This commit is contained in:
Steve Howell
2018-12-14 18:29:58 +00:00
committed by Tim Abbott
parent 012bb7b6c7
commit c8cee5d900

View File

@@ -64,10 +64,8 @@ exports.widget = function (parent_elem, my_stream_id) {
var max_topics = 5;
var topic_names = topic_data.get_recent_names(my_stream_id);
var my_stream_name = stream_data.get_sub_by_id(my_stream_id).name;
var ul = $('<ul class="topic-list">');
ul.attr('data-stream', my_stream_name);
_.each(topic_names, function (topic_name, idx) {
var num_unread = unread.num_unread_for_topic(my_stream_id, topic_name);