mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 03:41:58 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user