Skip to content

Commit ddba3b5

Browse files
committed
Merge branch 'V7' of github.com:GetStream/stream-chat-react-native into fix/message-list-auto-scroll-when-message-deleted-regression-v7
2 parents 4858fbc + 20655ab commit ddba3b5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

examples/ExpoMessaging/app/channel/[cid]/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { useHeaderHeight } from '@react-navigation/elements';
88

99
export default function ChannelScreen() {
1010
const router = useRouter();
11-
const { setThread, channel } = useContext(AppContext);
11+
const { setThread, channel, thread } = useContext(AppContext);
1212
const { setTopInset } = useAttachmentPickerContext();
1313
const headerHeight = useHeaderHeight();
1414

@@ -28,6 +28,7 @@ export default function ChannelScreen() {
2828
audioRecordingEnabled={true}
2929
channel={channel}
3030
keyboardVerticalOffset={headerHeight}
31+
thread={thread}
3132
>
3233
<View style={{ flex: 1 }}>
3334
<MessageList

package/src/components/MessageList/MessageList.tsx

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

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

0 commit comments

Comments
 (0)