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

@@ -184,7 +184,7 @@ export function update_stream_name(sub, new_name) {
// Update compose_state if needed
if (compose_state.stream_name() === old_name) {
compose_state.stream_name(new_name);
compose_state.set_stream_name(new_name);
}
// Update navbar if needed