compose_state: Break out stream_name() into separate getter and setter.

This code is equivalent, because the keep_leading_whitespace parameter
of get_or_set was never used for the stream name.

This addresses an open TODO and makes the code more readable.
This commit is contained in:
evykassirer
2022-10-26 15:22:29 -07:00
committed by Tim Abbott
parent 6200f0f734
commit 7f9989003a
8 changed files with 32 additions and 23 deletions

View File

@@ -329,7 +329,7 @@ export function start(msg_type, opts) {
//
// TODO: Move these into a conditional on message_type, using an
// explicit "clear" function for compose_state.
compose_state.stream_name(opts.stream);
compose_state.set_stream_name(opts.stream);
compose_state.topic(opts.topic);
// Set the recipients with a space after each comma, so it looks nice.