Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

compose-closed-ui: Rename update_reply_recipient_label.

Lauryn Menard94fe5fc17383
diff --git a/web/src/compose_closed_ui.ts b/web/src/compose_closed_ui.ts
index 41976e76268..83f5c8c43c6 100644
--- a/web/src/compose_closed_ui.ts
+++ b/web/src/compose_closed_ui.ts
@@ -171,7 +171,7 @@ export function set_standard_text_for_reply_button(): void {
set_reply_button_label($t({defaultMessage: "Compose message"}));
}
-export function update_reply_recipient_label(message?: ComposeClosedMessage): void {
+export function update_recipient_text_for_reply_button(message?: ComposeClosedMessage): void {
const recipient_label = get_recipient_label(message);
if (recipient_label !== undefined) {
const empty_string_topic_display_name = util.get_final_topic_display_name("");
@@ -194,7 +194,7 @@ export function initialize(): void {
// message_selected events can occur with Recent Conversations
// open due to the combined feed view loading in the background,
// so we only update if message feed is visible.
- update_reply_recipient_label();
+ update_recipient_text_for_reply_button();
// Disable compose reply button if the selected message is a stream
// message and the user is not allowed to post in the stream the message
diff --git a/web/src/inbox_ui.ts b/web/src/inbox_ui.ts
index 034f76b13c3..e3ef6748406 100644
--- a/web/src/inbox_ui.ts
+++ b/web/src/inbox_ui.ts
@@ -898,7 +898,7 @@ function update_closed_compose_text($row: JQuery, is_header_row: boolean): void
topic: $row.find(".inbox-topic-name a").text(),
};
}
- compose_closed_ui.update_reply_recipient_label(message);
+ compose_closed_ui.update_recipient_text_for_reply_button(message);
}
export function get_focused_row_message(): {message?: Message | undefined} & (
diff --git a/web/src/message_view.ts b/web/src/message_view.ts
index 73125c86920..2c5e61d5ebf 100644
--- a/web/src/message_view.ts
+++ b/web/src/message_view.ts
@@ -1498,7 +1498,7 @@ function handle_post_view_change(
} else {
compose_closed_ui.update_buttons_for_non_specific_views();
}
- compose_closed_ui.update_reply_recipient_label();
+ compose_closed_ui.update_recipient_text_for_reply_button();
message_view_header.render_title_area();
diff --git a/web/src/recent_view_ui.ts b/web/src/recent_view_ui.ts
index ba8cb6e730b..ff76fbad11e 100644
--- a/web/src/recent_view_ui.ts
+++ b/web/src/recent_view_ui.ts
@@ -357,7 +357,7 @@ function set_table_focus(row: number, col: number, using_keyboard = false): bool
topic: $topic_row.find(".recent_topic_name a").text(),
};
}
- compose_closed_ui.update_reply_recipient_label(message);
+ compose_closed_ui.update_recipient_text_for_reply_button(message);
return true;
}
diff --git a/web/tests/compose_closed_ui.test.cjs b/web/tests/compose_closed_ui.test.cjs
index ac7ca6805b7..92aa436c0bf 100644
--- a/web/tests/compose_closed_ui.test.cjs
+++ b/web/tests/compose_closed_ui.test.cjs
@@ -150,7 +150,7 @@ run_test("test_custom_message_input", () => {
stream_id: 10,
};
stream_data.add_sub(stream);
- compose_closed_ui.update_reply_recipient_label({
+ compose_closed_ui.update_recipient_text_for_reply_button({
stream_id: stream.stream_id,
topic: "topic test",
});
@@ -159,7 +159,7 @@ run_test("test_custom_message_input", () => {
run_test("empty_narrow", () => {
message_lists.current.visibly_empty = () => true;
- compose_closed_ui.update_reply_recipient_label();
+ compose_closed_ui.update_recipient_text_for_reply_button();
const label = $("#left_bar_compose_reply_button_big").text();
assert.equal(label, "translated: Compose message");
});