diff --git a/zephyr/static/js/compose.js b/zephyr/static/js/compose.js index 83b767b31a..7c233e0f01 100644 --- a/zephyr/static/js/compose.js +++ b/zephyr/static/js/compose.js @@ -422,22 +422,6 @@ exports.clear = function () { $("#send-status").hide(0); }; -// Set the mode of a compose already in progress. -// Does not clear the input fields. -exports.set_mode = function (mode) { - ui.change_tab_to('#home'); - if (!is_composing_message) { - exports.start(mode); - } - if (mode === 'private') { - show('private'); - is_composing_message = "private"; - } else { - show('stream'); - is_composing_message = "stream"; - } -}; - exports.composing = function () { return is_composing_message; }; @@ -638,7 +622,7 @@ $(function () { // when text gets added into the composebox. if (!compose.composing()) { respond_to_sent_message = true; - compose.set_mode('stream'); + compose.start('stream'); } if (i === -1) { // This is a paste, so there's no filename. Show the image directly @@ -662,7 +646,7 @@ $(function () { var textbox = $("#new_message_content"); if (!compose.composing()) { respond_to_sent_message = true; - compose.set_mode('stream'); + compose.start('stream'); } textbox.val(textbox.val() + contents); } diff --git a/zephyr/static/js/hotkey.js b/zephyr/static/js/hotkey.js index bee9e9f106..b4d087aa32 100644 --- a/zephyr/static/js/hotkey.js +++ b/zephyr/static/js/hotkey.js @@ -246,11 +246,11 @@ function process_hotkey(e) { } return true; case 'compose': // 'c': compose - compose.set_mode('stream'); + compose.start('stream'); respond_to_sent_message = true; return true; case 'compose_private_message': - compose.set_mode('private'); + compose.start('private'); respond_to_sent_message = true; return true; case 'enter': // Enter: respond to message (unless we need to do something else) diff --git a/zephyr/static/js/ui.js b/zephyr/static/js/ui.js index b7f6b7df3f..8a303cab08 100644 --- a/zephyr/static/js/ui.js +++ b/zephyr/static/js/ui.js @@ -1205,11 +1205,11 @@ $(function () { }); $('.compose_stream_button').click(function (e) { - compose.set_mode('stream'); + compose.start('stream'); return false; }); $('.compose_private_button').click(function (e) { - compose.set_mode('private'); + compose.start('private'); return false; });