mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 02:17:19 +00:00
Fade around new recipient when restoring a draft.
(imported from commit 7888ae124bfba150b354ba27cb12c99364b43263)
This commit is contained in:
@@ -243,6 +243,7 @@ function create_message_object() {
|
|||||||
if (message.type === "private") {
|
if (message.type === "private") {
|
||||||
// TODO: this should be collapsed with the code in composebox_typeahead.js
|
// TODO: this should be collapsed with the code in composebox_typeahead.js
|
||||||
message.to = compose.recipient().split(/\s*[,;]\s*/);
|
message.to = compose.recipient().split(/\s*[,;]\s*/);
|
||||||
|
message.reply_to = compose.recipient();
|
||||||
} else {
|
} else {
|
||||||
message.to = compose.stream_name();
|
message.to = compose.stream_name();
|
||||||
}
|
}
|
||||||
@@ -274,6 +275,14 @@ exports.restore_message = function() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var snapshot_copy = $.extend({}, message_snapshot);
|
var snapshot_copy = $.extend({}, message_snapshot);
|
||||||
|
if ((snapshot_copy.type === "stream" &&
|
||||||
|
snapshot_copy.stream.length > 0 &&
|
||||||
|
snapshot_copy.subject.length > 0) ||
|
||||||
|
(snapshot_copy.type === "private" &&
|
||||||
|
snapshot_copy.reply_to.length > 0)) {
|
||||||
|
snapshot_copy = $.extend({replying_to_message: snapshot_copy},
|
||||||
|
snapshot_copy);
|
||||||
|
}
|
||||||
clear_message_snapshot();
|
clear_message_snapshot();
|
||||||
exports.unfade_messages(true);
|
exports.unfade_messages(true);
|
||||||
compose.start(snapshot_copy.type, snapshot_copy);
|
compose.start(snapshot_copy.type, snapshot_copy);
|
||||||
|
|||||||
Reference in New Issue
Block a user