mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
compose-closed-ui: Rename update_reply_recipient_label.
Renames update_reply_recipient_label to update_recipient_text_for_reply_button. This better matches the function that sets the default text for the closed compose box button: set_standard_text_for_reply_button.
This commit is contained in:
committed by
Tim Abbott
parent
1b260c9fd7
commit
94fe5fc173
@@ -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
|
||||
|
@@ -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} & (
|
||||
|
@@ -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();
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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");
|
||||
});
|
||||
|
Reference in New Issue
Block a user