From 24a235a09191bbd9b58a590cd76d4110f7e5c4f6 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 12 Mar 2013 16:34:58 -0400 Subject: [PATCH] compose: Move unfade_messages() call inside fade_around. This makes the API a little cleaner. (imported from commit c5eb9a4998971cdbe1f8ac3a14fd9759584771bb) --- zephyr/static/js/compose.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/zephyr/static/js/compose.js b/zephyr/static/js/compose.js index dd2787474e..752ab23ef1 100644 --- a/zephyr/static/js/compose.js +++ b/zephyr/static/js/compose.js @@ -90,10 +90,11 @@ function messages_with_different_recipients(target_message) { } function fade_around(reply_message) { + compose.unfade_messages(true); + faded_to = reply_message; var i, fade_class = narrow.active() ? "message_reply_fade_narrowed" : "message_reply_fade"; var elts_to_fade = messages_with_different_recipients(reply_message); - faded_to = reply_message; for (i = 0; i < elts_to_fade.length; i++) { $(elts_to_fade[i]).addClass(fade_class); } @@ -189,10 +190,6 @@ exports.start = function (msg_type, opts) { } if (opts.replying_to_message !== undefined) { - if (exports.composing() && (faded_to !== opts.replying_to_message)) { - // Already faded to another message. First unfade everything. - exports.unfade_messages(true); - } fade_around(opts.replying_to_message); }