diff --git a/web/src/message_list_view.js b/web/src/message_list_view.js index d92f2e9f8e..15b5962426 100644 --- a/web/src/message_list_view.js +++ b/web/src/message_list_view.js @@ -1208,7 +1208,9 @@ export class MessageListView { _rerender_header(message_containers) { // Given a list of messages that are in the **same** message group, - // rerender the header / recipient bar of the messages + // rerender the header / recipient bar of the messages. This method + // should only be called with rerender_messages as the rerendered + // header may need to be updated for the "sticky_header" class. if (message_containers.length === 0) { return; } @@ -1315,6 +1317,10 @@ export class MessageListView { for (const messages_in_group of message_groups) { this._rerender_header(messages_in_group, message_content_edited); } + + if (message_lists.current === this.list && narrow_state.is_message_feed_visible()) { + this.update_sticky_recipient_headers(); + } } append(messages, messages_are_new) {