From dd7d31c7a6aae9ca5209fb95b915e2c04352a8d2 Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Mon, 27 Jan 2014 14:02:09 -0500 Subject: [PATCH] Allow an empty home view when unnarrowing (imported from commit 69f1a84b23ae8942db58851a1a1c6723c26df560) --- static/js/narrow.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/static/js/narrow.js b/static/js/narrow.js index 6d5934c978..0af7d8b6fb 100644 --- a/static/js/narrow.js +++ b/static/js/narrow.js @@ -435,9 +435,12 @@ exports.deactivate = function () { // We fall back to the closest selected id, if the user has removed a // stream from the home view since leaving it the old selected id might // no longer be there + // Additionally, we pass empty_ok as the user may have removed **all** streams + // from her home view current_msg_list.select_id(current_msg_list.selected_id(), { then_scroll: !preserve_pre_narrowing_screen_position, - use_closest: true + use_closest: true, + empty_ok: true }); if (preserve_pre_narrowing_screen_position) {