mirror of
https://github.com/zulip/zulip.git
synced 2025-10-24 08:33:43 +00:00
Allow an empty home view when unnarrowing
(imported from commit 69f1a84b23ae8942db58851a1a1c6723c26df560)
This commit is contained in:
@@ -435,9 +435,12 @@ exports.deactivate = function () {
|
|||||||
// We fall back to the closest selected id, if the user has removed a
|
// 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
|
// stream from the home view since leaving it the old selected id might
|
||||||
// no longer be there
|
// 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(), {
|
current_msg_list.select_id(current_msg_list.selected_id(), {
|
||||||
then_scroll: !preserve_pre_narrowing_screen_position,
|
then_scroll: !preserve_pre_narrowing_screen_position,
|
||||||
use_closest: true
|
use_closest: true,
|
||||||
|
empty_ok: true
|
||||||
});
|
});
|
||||||
|
|
||||||
if (preserve_pre_narrowing_screen_position) {
|
if (preserve_pre_narrowing_screen_position) {
|
||||||
|
|||||||
Reference in New Issue
Block a user