Un-debounce fade/unfade when starting a compose.

When starting a compose, call compose_fade.set_faded_messages,
which will immediately do fade/unfade logic, whereas before
the code path went thru debouncing logic.

(imported from commit 7d0b30435be32a7132dbf05bf064b03b925a2d42)
This commit is contained in:
Steve Howell 2013-08-11 18:08:36 -04:00
parent 6cc5c43e59
commit 6591c79184
2 changed files with 6 additions and 1 deletions

View File

@ -192,7 +192,7 @@ exports.start = function (msg_type, opts) {
show_box('private', $("#" + (focus_area || 'private_message_recipient')));
}
update_fade();
compose_fade.set_faded_messages(msg_type);
exports.decorate_stream_bar(opts.stream);
$(document).trigger($.Event('compose_started.zulip', opts));

View File

@ -89,6 +89,11 @@ function _update_faded_messages() {
// cause typing sluggishness.
exports.update_faded_messages = _.debounce(_update_faded_messages, 150);
exports.set_faded_messages = function (msg_type) {
exports.set_focused_recipient(msg_type);
_update_faded_messages();
};
return exports;
}());