Move compose.start() calls out of click handlers.

For the two cases where narrowing should open the compose box,
we now put that logic inside of narrow.js.

(imported from commit 570e22e90c2f6d422ba71cce400c075f0b8adf51)
This commit is contained in:
Steve Howell
2013-10-10 09:54:18 -04:00
parent 7007cf203d
commit 8017fc9a15
3 changed files with 11 additions and 23 deletions

View File

@@ -117,22 +117,6 @@ exports.decorate_stream_bar = function (stream_name) {
.addClass(stream_color.get_color_class(color));
};
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");
}
};
function update_fade () {
if (!is_composing_message) {
return;