refactor: Refactor the compose placeholder text function.

This is a prep commit. Refactoring this makes it easier to reuse
these functions in other places without having to create the `opts`
object again.
This commit is contained in:
Vinit Singh
2020-07-27 19:37:38 +05:30
committed by Tim Abbott
parent a01d33353f
commit afa87156c6
2 changed files with 11 additions and 11 deletions

View File

@@ -1222,13 +1222,7 @@ exports.initialize = function () {
});
$("#compose-textarea").on("focus", () => {
const opts = {
message_type: compose_state.get_message_type(),
stream: $("#stream_message_recipient_stream").val(),
topic: $("#stream_message_recipient_topic").val(),
private_message_recipient: compose_pm_pill.get_emails(),
};
compose_actions.update_placeholder_text(opts);
compose_actions.update_placeholder_text();
});
if (page_params.narrow !== undefined) {