Skip to content

Commit

Permalink
feat: add reanimated to messageContainer (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuberquia2115 authored Jun 27, 2023
1 parent 7b0789b commit bf61520
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"react-native-iphone-x-helper": "1.3.1",
"react-native-lightbox-v2": "0.9.0",
"react-native-parsed-text": "0.0.22",
"react-native-reanimated": "~2.14.4",
"react-native-typing-animation": "0.1.7",
"use-memo-one": "1.1.3",
"uuid": "3.4.0"
Expand Down
5 changes: 3 additions & 2 deletions src/GiftedChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
} from 'react-native'
import { LightboxProps } from 'react-native-lightbox-v2'
import uuid from 'uuid'
import Reanimated from 'react-native-reanimated'
import { Actions, ActionsProps } from './Actions'
import { Avatar, AvatarProps } from './Avatar'
import Bubble from './Bubble'
Expand Down Expand Up @@ -441,7 +442,7 @@ function GiftedChat<TMessage extends IMessage = IMessage>(
const { messagesContainerStyle, ...messagesContainerProps } = props

const fragment = (
<View
<Reanimated.View
style={[
typeof state.messagesContainerHeight === 'number' && {
height: state.messagesContainerHeight,
Expand All @@ -457,7 +458,7 @@ function GiftedChat<TMessage extends IMessage = IMessage>(
isTyping={isTyping}
/>
{_renderChatFooter()}
</View>
</Reanimated.View>
)

return isKeyboardInternallyHandled ? (
Expand Down

0 comments on commit bf61520

Please sign in to comment.