Update recipient on renarrow when compose box is open but empty.

(imported from commit ff50b3b38833e7467ca77714acb1d81c22aeed0c)
This commit is contained in:
Tim Abbott 2013-03-12 15:53:54 -04:00
parent ee8d646d74
commit 6c6a005920
2 changed files with 17 additions and 0 deletions

View File

@ -121,6 +121,22 @@ exports.update_faded_messages = function () {
fade_around(faded_to);
};
exports.update_recipient_on_narrow = function() {
if (!compose.composing()) {
return;
}
if (compose.message_content() !== "") {
return;
}
var compose_opts = {};
narrow.set_compose_defaults(compose_opts);
if (compose_opts.stream) {
compose.start("stream");
} else {
compose.start("private");
}
};
exports.start = function (msg_type, opts) {
if (reload.is_in_progress()) {
return;

View File

@ -339,6 +339,7 @@ exports.activate = function (operators, opts) {
hashchange.save_narrow(operators);
$('#search_query').val(unparse(operators));
search.update_button_visibility();
compose.update_recipient_on_narrow();
compose.update_faded_messages();
$("ul.filters li").removeClass('active-filter');