stream_settings: Extract function to set title in right column.

This is a prep commit such that we can use this function to
live-update the title.
This commit is contained in:
Sahil Batra 2022-01-27 13:23:17 +05:30 committed by Tim Abbott
parent 12efde8a51
commit 74294ae602
1 changed files with 5 additions and 1 deletions

View File

@ -39,6 +39,10 @@ import * as ui from "./ui";
import * as ui_report from "./ui_report"; import * as ui_report from "./ui_report";
import * as util from "./util"; import * as util from "./util";
export function set_right_panel_title(sub) {
$("#subscription_overlay .stream-info-title").html(render_selected_stream_title(sub));
}
export const show_subs_pane = { export const show_subs_pane = {
nothing_selected() { nothing_selected() {
$(".settings, #stream-creation").hide(); $(".settings, #stream-creation").hide();
@ -48,7 +52,7 @@ export const show_subs_pane = {
settings(sub) { settings(sub) {
$(".settings, #stream-creation").hide(); $(".settings, #stream-creation").hide();
$(".settings").show(); $(".settings").show();
$("#subscription_overlay .stream-info-title").html(render_selected_stream_title(sub)); set_right_panel_title(sub);
}, },
create_stream() { create_stream() {
$(".nothing-selected, .settings, #stream-creation").hide(); $(".nothing-selected, .settings, #stream-creation").hide();