mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 16:37:23 +00:00
compose: Don't clear the compose box when recipient didn't change.
(imported from commit 5188a0f510e499c80d4c188a1ce59af4f2fe3262)
This commit is contained in:
@@ -126,8 +126,6 @@ exports.start = function (msg_type, opts) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
compose.clear();
|
|
||||||
|
|
||||||
var default_opts = {
|
var default_opts = {
|
||||||
message_type: msg_type,
|
message_type: msg_type,
|
||||||
stream: '',
|
stream: '',
|
||||||
@@ -140,6 +138,16 @@ exports.start = function (msg_type, opts) {
|
|||||||
|
|
||||||
opts = $.extend(default_opts, opts);
|
opts = $.extend(default_opts, opts);
|
||||||
|
|
||||||
|
if (!(compose.composing() === msg_type &&
|
||||||
|
((msg_type === "stream" &&
|
||||||
|
opts.stream === compose.stream() &&
|
||||||
|
opts.subject === compose.subject()) ||
|
||||||
|
(msg_type === "private" &&
|
||||||
|
opts.private_message_recipient === compose.recipient())))) {
|
||||||
|
// Clear the compose box if the existing message is to a different recipient
|
||||||
|
compose.clear();
|
||||||
|
}
|
||||||
|
|
||||||
compose.stream_name(opts.stream);
|
compose.stream_name(opts.stream);
|
||||||
compose.subject(opts.subject);
|
compose.subject(opts.subject);
|
||||||
compose.recipient(opts.private_message_recipient);
|
compose.recipient(opts.private_message_recipient);
|
||||||
|
|||||||
Reference in New Issue
Block a user