message_ui: Add class to message-list if conversation view.

When the current view is a conversation view, add the class
`is-conversation-view` to `div.focused-message-list`.
The check is done when `message_list_view` is rendered, which is
in the `render()` function.

Fixes part of #26852.

Co-authored by: ecxtacy <dc.dhruvchouhan@gmail.com>
This commit is contained in:
whilstsomebody
2024-11-03 20:11:11 +05:30
committed by Tim Abbott
parent b7763f71e5
commit 8c9900bf5e

View File

@@ -56,6 +56,12 @@ export function update_current_message_list(msg_list: MessageList | undefined):
message_list_data_cache.add(current.data);
current.view.$list.addClass("focused-message-list");
}
if (current?.data.filter.is_conversation_view()) {
$(".focused-message-list").addClass("is-conversation-view");
} else {
$(".focused-message-list").removeClass("is-conversation-view");
}
}
export function all_rendered_message_lists(): MessageList[] {