mirror of https://github.com/zulip/zulip.git
Update recipient on renarrow when compose box is open but empty.
(imported from commit ff50b3b38833e7467ca77714acb1d81c22aeed0c)
This commit is contained in:
parent
ee8d646d74
commit
6c6a005920
|
@ -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;
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue