mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 03:11:54 +00:00
narrow: Inline set_narrow_title helper.
Now that it only has a single caller, it's easier to read the code to get rid of this tiny helper.
This commit is contained in:
@@ -116,13 +116,8 @@ export function save_pre_narrow_offset_for_reload() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export let narrow_title = "home";
|
|
||||||
export let has_shown_message_list_view = false;
|
export let has_shown_message_list_view = false;
|
||||||
|
|
||||||
function set_narrow_title(title) {
|
|
||||||
narrow_title = title;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function compute_narrow_title(filter) {
|
export function compute_narrow_title(filter) {
|
||||||
if (filter === undefined) {
|
if (filter === undefined) {
|
||||||
// "All messages" and "Recent conversations" views have
|
// "All messages" and "Recent conversations" views have
|
||||||
@@ -170,9 +165,9 @@ export function compute_narrow_title(filter) {
|
|||||||
return filter_title;
|
return filter_title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export let narrow_title = "home";
|
||||||
export function update_narrow_title(filter) {
|
export function update_narrow_title(filter) {
|
||||||
const narrow_title_string = compute_narrow_title(filter);
|
narrow_title = compute_narrow_title(filter);
|
||||||
set_narrow_title(narrow_title_string);
|
|
||||||
notifications.redraw_title();
|
notifications.redraw_title();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user