mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 00:46:03 +00:00
compose: Use stream_name() and topic() abstraction everywhere.
This commit is contained in:
@@ -501,7 +501,7 @@ export function initialize() {
|
||||
(event) => {
|
||||
event.preventDefault();
|
||||
|
||||
const stream_name = $("#stream_message_recipient_stream").val();
|
||||
const stream_name = compose_state.stream_name();
|
||||
if (stream_name === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -126,8 +126,9 @@ export function focus_in_empty_compose(consider_start_of_whitespace_message_empt
|
||||
case "private_message_recipient":
|
||||
return private_message_recipient().length === 0;
|
||||
case "stream_message_recipient_topic":
|
||||
return topic() === "";
|
||||
case "stream_message_recipient_stream":
|
||||
return document.activeElement.value === "";
|
||||
return stream_name() === "";
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user