From c00a05489364246a5b2ea407899eaf48d33992b8 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Thu, 3 May 2018 13:05:57 +0000 Subject: [PATCH] minor: Update comment in narrow.activate(). --- static/js/narrow.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/static/js/narrow.js b/static/js/narrow.js index 1cdebbbb63..8af75e6fbc 100644 --- a/static/js/narrow.js +++ b/static/js/narrow.js @@ -144,9 +144,12 @@ exports.activate = function (raw_operators, opts) { } } - // For legacy reasons, we need to set current_filter before calling - // muting_enabled. + // IMPORTANT! At this point we are heavily committed to + // populating the new narrow, so we update our narrow_state. + // From here on down, any calls to the narrow_state API will + // reflect the upcoming narrow. narrow_state.set_current_filter(filter); + var muting_enabled = narrow_state.muting_enabled(); // Save how far from the pointer the top of the message list was.