mirror of
https://github.com/zulip/zulip.git
synced 2025-11-08 16:01:58 +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;
|
||||
}
|
||||
|
||||
compose.clear();
|
||||
|
||||
var default_opts = {
|
||||
message_type: msg_type,
|
||||
stream: '',
|
||||
@@ -140,6 +138,16 @@ exports.start = function (msg_type, 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.subject(opts.subject);
|
||||
compose.recipient(opts.private_message_recipient);
|
||||
|
||||
Reference in New Issue
Block a user