Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
message_list_view: Calculate edited_notice_locations without message_container.
evykassirerd1a05bbdac29
diff --git a/web/src/message_list_view.js b/web/src/message_list_view.jsindex 578988e08f9..3c91ac46c1e 100644--- a/web/src/message_list_view.js+++ b/web/src/message_list_view.js@@ -930,10 +930,20 @@ export class MessageListView {const include_sender = message_container.include_sender;const is_hidden = message_container.is_hidden;const status_message = Boolean(message_container.status_message);- message_container.message_edit_notices_in_left_col = !include_sender && !is_hidden;- message_container.message_edit_notices_alongside_sender = include_sender && !status_message;- message_container.message_edit_notices_for_status_message =- include_sender && status_message;+ Object.assign(+ message_container,+ this.get_edited_notice_locations(include_sender, is_hidden, status_message),+ );+ }++ get_edited_notice_locations(include_sender, is_hidden, status_message) {+ // Based on the variables that define the overall message's HTML layout, set+ // variables defining where the message-edited notices should be placed.+ return {+ message_edit_notices_in_left_col: !include_sender && !is_hidden,+ message_edit_notices_alongside_sender: include_sender && !status_message,+ message_edit_notices_for_status_message: include_sender && status_message,+ };}render(messages, where, messages_are_new) {