subs: Move comment about live update for stream names in navbar.

A comment about the difficulties relating to live updating stream
names in the navbar was incorrectly placed within the function for
live updating stream descriptions in
023187b3f1.

This moves the comment to the right place.
This commit is contained in:
YashRE42
2020-06-08 19:02:42 +00:00
committed by Tim Abbott
parent f0d8f60b66
commit b292c30d6a

View File

@@ -143,6 +143,12 @@ exports.update_stream_name = function (sub, new_name) {
// Update navbar stream name if needed
const filter = narrow_state.filter();
if (filter && filter.operands("stream")[0] === old_name) {
// TODO: This doesn't work, because the `filter` object
// represents the stream by name and hasn't been updated.
//
// This will likely be fixed automatically as we migrate to
// using search pills and then a stream ID based
// representation of the stream in Filter objects.
tab_bar.render_title_area();
}
};
@@ -161,12 +167,6 @@ exports.update_stream_description = function (sub, description, rendered_descrip
// Update navbar if needed
const filter = narrow_state.filter();
if (filter && filter.operands("stream")[0] === sub.name) {
// TODO: This doesn't work, because the `filter` object
// represents the stream by name and hasn't been updated.
//
// This will likely be fixed automatically as we migrate to
// using search pills and then a stream ID based
// representation of the stream in Filter objects.
tab_bar.render_title_area();
}
};