Skip to content

Commit e1250d8

Browse files
authored
fix: regression in message sclist scrolling when message deleted (#3190)
* fix: update the stream-chat version to 9.13.0 on v7 * fix: fix: auto scroll to bottom when the message was deleted or removed from the list * fix: regression in message sclist scrolling when message deleted * fix: regression in message sclist scrolling when message deleted
1 parent 20655ab commit e1250d8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

package/src/components/MessageList/MessageList.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -593,9 +593,10 @@ const MessageListWithContext = (props: MessageListPropsWithContext) => {
593593
}
594594

595595
if (
596-
topMessageBeforeUpdate.current?.created_at &&
597-
topMessageAfterUpdate?.created_at &&
598-
topMessageBeforeUpdate.current.created_at < topMessageAfterUpdate.created_at
596+
isMessageRemovedFromMessageList ||
597+
(topMessageBeforeUpdate.current?.created_at &&
598+
topMessageAfterUpdate?.created_at &&
599+
topMessageBeforeUpdate.current.created_at < topMessageAfterUpdate.created_at)
599600
) {
600601
channelResyncScrollSet.current = false;
601602
setScrollToBottomButtonVisible(false);

0 commit comments

Comments
 (0)