Skip to content

Commit 5da09e3

Browse files
committed
fix: add improvements to scrolling
1 parent 015eb37 commit 5da09e3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

package/src/components/MessageList/MessageFlashList.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,12 @@ const MessageFlashListWithContext = (props: MessageFlashListPropsWithContext) =>
468468
return;
469469
}
470470

471-
if (isMessageRemovedFromMessageList) {
471+
if (
472+
isMessageRemovedFromMessageList ||
473+
(topMessageBeforeUpdate.current?.created_at &&
474+
topMessageAfterUpdate?.created_at &&
475+
topMessageBeforeUpdate.current.created_at < topMessageAfterUpdate.created_at)
476+
) {
472477
channelResyncScrollSet.current = false;
473478
setScrollToBottomButtonVisible(false);
474479
resetPaginationTrackersRef.current();

0 commit comments

Comments
 (0)