refactor: Extract compose.do_post_send_tasks().

This commit is contained in:
Steve Howell 2018-06-02 11:38:40 +00:00 committed by Tim Abbott
parent b47bc0e082
commit 87ba752758
1 changed files with 5 additions and 1 deletions

View File

@ -309,11 +309,15 @@ exports.finish = function () {
} else {
exports.send_message();
}
exports.do_post_send_tasks();
return true;
};
exports.do_post_send_tasks = function () {
exports.clear_preview_area();
// TODO: Do we want to fire the event even if the send failed due
// to a server-side error?
$(document).trigger($.Event('compose_finished.zulip'));
return true;
};
exports.update_email = function (user_id, new_email) {