compose: Distinguish get_message_type() from composing().

We now only call compose_state.composing() in a boolean context,
where we simply care whether or not the compose box is open.  The
function now also returns true/false.

Callers who need to know the actual message type (e.g. "stream" or
"private") now call compose_state.get_message_type().
This commit is contained in:
Steve Howell
2017-04-24 11:35:26 -07:00
committed by Tim Abbott
parent 2adf641b72
commit c999bdf823
8 changed files with 18 additions and 19 deletions

View File

@@ -72,7 +72,7 @@ exports.snapshot_message = function () {
// Save what we can.
var message = {
type: compose_state.composing(),
type: compose_state.get_message_type(),
content: compose_state.message_content(),
};
if (message.type === "private") {