Make 'New stream' and 'New PM' buttons work when not on home tab.

This fixes Trac #898.

Prior to this commit, we only changed the tab to #home in
compose.start; i.e. when a compose was not already in progress. This
means that if the composebox was open and we were on the settings
page, clicking one of these buttons would not work.

(imported from commit aa88a605cdcb61d5b6a1ece6292001c5f5a19c66)
This commit is contained in:
Waseem Daher
2013-02-17 17:44:02 -05:00
parent 73372882cb
commit 2b7b39fe1f

View File

@@ -203,6 +203,7 @@ exports.clear = function () {
// 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);
}