Skip to content

Commit

Permalink
add a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
haileyok committed May 18, 2024
1 parent c6eec61 commit 0bf0c30
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/screens/Messages/Conversation/MessagesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,11 @@ export function MessagesList({

const kh = animatedKeyboard.height.value
const fkh = finalKeyboardHeight.value

// We only run the layout scroll if:
// - We're on web
// - The keyboard is not open. This accounts for changing block states
// - The final keyboard height has been initially set and the keyboard height is greater than that
if (isWeb || kh === 0 || (fkh > 0 && kh >= fkh)) {
flatListRef.current?.scrollToEnd({animated: true})
}
Expand Down

0 comments on commit 0bf0c30

Please sign in to comment.