mirror of https://github.com/zulip/zulip.git
compose_actions: Include message type in show_compose_box opts.
This commit is contained in:
parent
5934081801
commit
1f7e419cee
|
@ -58,15 +58,12 @@ function hide_box() {
|
||||||
$("#compose_controls").show();
|
$("#compose_controls").show();
|
||||||
}
|
}
|
||||||
|
|
||||||
function show_compose_box(message_type, opts) {
|
function show_compose_box(opts) {
|
||||||
compose_recipient.update_compose_for_message_type({...opts, message_type});
|
compose_recipient.update_compose_for_message_type(opts);
|
||||||
$("#compose").css({visibility: "visible"});
|
$("#compose").css({visibility: "visible"});
|
||||||
// When changing this, edit the 42px in _maybe_autoscroll
|
// When changing this, edit the 42px in _maybe_autoscroll
|
||||||
$(".new_message_textarea").css("min-height", "3em");
|
$(".new_message_textarea").css("min-height", "3em");
|
||||||
compose_ui.set_focus({
|
compose_ui.set_focus(opts);
|
||||||
...opts,
|
|
||||||
message_type,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function clear_textarea() {
|
export function clear_textarea() {
|
||||||
|
@ -272,7 +269,10 @@ export function start(msg_type, opts) {
|
||||||
compose_state.set_message_type(msg_type);
|
compose_state.set_message_type(msg_type);
|
||||||
|
|
||||||
// Show either stream/topic fields or "You and" field.
|
// Show either stream/topic fields or "You and" field.
|
||||||
show_compose_box(msg_type, opts);
|
show_compose_box({
|
||||||
|
...opts,
|
||||||
|
message_type: msg_type,
|
||||||
|
});
|
||||||
|
|
||||||
if (opts.draft_id) {
|
if (opts.draft_id) {
|
||||||
$("textarea#compose-textarea").data("draft-id", opts.draft_id);
|
$("textarea#compose-textarea").data("draft-id", opts.draft_id);
|
||||||
|
|
Loading…
Reference in New Issue