From 8b78f3f1332807fd087b3d1bd18df95e90cca56a Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Thu, 11 May 2017 14:25:42 -0700 Subject: [PATCH] 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. --- static/js/stream_data.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/static/js/stream_data.js b/static/js/stream_data.js index a082c2dc7a..c55f070c7b 100644 --- a/static/js/stream_data.js +++ b/static/js/stream_data.js @@ -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; }