mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	compose: Extract compose.toggle_entry_sends_ui function.
This commit extracts the code for hiding and showing the send button according to 'enter_sends' setting value in a separate function.
This commit is contained in:
		@@ -124,6 +124,15 @@ export function empty_topic_placeholder() {
 | 
			
		||||
    return $t({defaultMessage: "(no topic)"});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function toggle_enter_sends_ui() {
 | 
			
		||||
    const send_button = $("#compose-send-button");
 | 
			
		||||
    if (page_params.enter_sends) {
 | 
			
		||||
        send_button.fadeOut();
 | 
			
		||||
    } else {
 | 
			
		||||
        send_button.fadeIn();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function create_message_object() {
 | 
			
		||||
    // Topics are optional, and we provide a placeholder if one isn't given.
 | 
			
		||||
    let topic = compose_state.topic();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user