subs: Explicitly show right section when required.

Instead of just depending upon clicks of certain buttons to
show the right section, we also show them when user is
creating a new stream or viewing settings of a specific stream.

This fixes a bug where user lands on `#streams/new` via url change
without clicking of any buttons and sees on left section of the
overlay in medium width (756px) devices.
This commit is contained in:
Aman Agrawal 2021-06-08 14:21:41 +00:00 committed by Tim Abbott
parent 5dfedcabc3
commit 9decaeda0a
1 changed files with 2 additions and 0 deletions

View File

@ -698,6 +698,7 @@ export function change_state(section) {
if (section === "new") {
if (!page_params.is_guest) {
do_open_create_stream();
show_right_section();
} else {
toggler.goto("subscribed");
}
@ -723,6 +724,7 @@ export function change_state(section) {
if (page_params.is_guest && !stream_data.id_is_subscribed(stream_id)) {
toggler.goto("subscribed");
} else {
show_right_section();
switch_to_stream_row(stream_id);
}
return;