mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 10:26:28 +00:00
compose-closed: Fix updating buttons when not in DM narrow.
When processing a server event or an empty message fetch, we were incorrectly updating the closed new conversation button attribute, "data-conversation-type" to be "direct" without checking to see if the current narrow filter was actually a direct message view. Adds a helper function that checks the current filter for contains_only_private_messages and then calls compose_closed_ui.update_buttons_for_private when true. That's the same check that's used in message_view.handle_post_view_change when compose_closed_ui.update_buttons_for_private is called, so we're consistently using the same check when updating the closed compose box buttons for this state.
This commit is contained in:
committed by
Tim Abbott
parent
c1480bec36
commit
1c7e4a5e09
@@ -128,7 +128,7 @@ export function fetch_more_if_required_for_current_msg_list(
|
||||
// no messages to display in this narrow.
|
||||
narrow_banner.show_empty_narrow_message(message_lists.current.data.filter);
|
||||
message_lists.current.update_trailing_bookend();
|
||||
compose_closed_ui.update_buttons_for_private();
|
||||
compose_closed_ui.maybe_update_buttons_for_dm_recipient();
|
||||
compose_recipient.check_posting_policy_for_compose_box();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user