From 7da6682b5a75db948c4046f62f7decf3ffa782f7 Mon Sep 17 00:00:00 2001 From: Hailey Date: Fri, 17 May 2024 22:09:50 -0700 Subject: [PATCH] nit --- src/screens/Messages/Conversation/MessagesList.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/screens/Messages/Conversation/MessagesList.tsx b/src/screens/Messages/Conversation/MessagesList.tsx index 08cc88b90d1..77314cd916d 100644 --- a/src/screens/Messages/Conversation/MessagesList.tsx +++ b/src/screens/Messages/Conversation/MessagesList.tsx @@ -138,9 +138,6 @@ export function MessagesList({ animated: false, }) } else { - if (!hasScrolled && !convoState.isFetchingHistory) { - setHasScrolled(true) - } // Always prefer a synchronous scroll on native. if (isNative) { dispatchCommand(flatListRef, 'scrollToEnd', [hasScrolled]) @@ -148,7 +145,12 @@ export function MessagesList({ flatListRef.current?.scrollToEnd({animated: hasScrolled}) } } + + if (!hasScrolled && !convoState.isFetchingHistory) { + setHasScrolled(true) + } } + contentHeight.value = height prevItemCount.current = convoState.items.length },