Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
haileyok committed May 18, 2024
1 parent 4e8b822 commit 7da6682
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/screens/Messages/Conversation/MessagesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,17 +138,19 @@ 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])
} else {
flatListRef.current?.scrollToEnd({animated: hasScrolled})
}
}

if (!hasScrolled && !convoState.isFetchingHistory) {
setHasScrolled(true)
}
}

contentHeight.value = height
prevItemCount.current = convoState.items.length
},
Expand Down

0 comments on commit 7da6682

Please sign in to comment.