Look up old stream names in stream_data.get_name().

This change fixes a few small things related to stream
renames, such as what happens if you hit the back button
to go to a narrow where the stream had been renamed.  You
will now get the correct behavior in terms of filtering
and searching.  Unfortunately, this will only last until
you reload.
This commit is contained in:
Steve Howell 2017-05-11 14:25:42 -07:00 committed by Tim Abbott
parent 191741a382
commit 8b78f3f133
1 changed files with 4 additions and 1 deletions

View File

@ -208,7 +208,10 @@ exports.get_name = function (stream_name) {
// stream_name if we don't have a subscription. (Stream names
// are case-insensitive, but we try to display the actual name
// when we know it.)
var sub = exports.get_sub(stream_name);
//
// This function will also do the right thing if we have
// an old stream name in memory for a recently renamed stream.
var sub = exports.get_sub_by_name(stream_name);
if (sub === undefined) {
return stream_name;
}