Skip to content

Commit

Permalink
bump
Browse files Browse the repository at this point in the history
  • Loading branch information
xcarpentier committed Sep 19, 2019
1 parent b2cb8f7 commit 152ab3c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions App.js
Expand Up @@ -246,6 +246,8 @@ export default class App extends Component {
parsePatterns={this.parsePatterns} parsePatterns={this.parsePatterns}
user={user} user={user}
scrollToBottom scrollToBottom
onLongPressAvatar={user => alert(JSON.stringify(user))}
onPressAvatar={() => alert('short press')}
onQuickReply={this.onQuickReply} onQuickReply={this.onQuickReply}
keyboardShouldPersistTaps='never' keyboardShouldPersistTaps='never'
renderAccessory={Platform.OS === 'web' ? null : this.renderAccessory} renderAccessory={Platform.OS === 'web' ? null : this.renderAccessory}
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{ {
"name": "react-native-gifted-chat", "name": "react-native-gifted-chat",
"version": "0.10.0-beta.web.10", "version": "0.10.0-beta.web.11",
"description": "The most complete chat UI for React Native", "description": "The most complete chat UI for React Native",
"main": "node_modules/expo/AppEntry.js", "main": "node_modules/expo/AppEntry.js",
"types": "lib/index.d.ts", "types": "lib/index.d.ts",
Expand Down
12 changes: 6 additions & 6 deletions src/GiftedChat.tsx
Expand Up @@ -398,10 +398,10 @@ class GiftedChat<TMessage extends IMessage = IMessage> extends React.Component<
} }


componentDidUpdate(prevProps: GiftedChatProps<TMessage> = {}) { componentDidUpdate(prevProps: GiftedChatProps<TMessage> = {}) {
if(this.props !== prevProps) { if (this.props !== prevProps) {
const { messages, text } = this.props const { messages, text } = this.props
this.setMessages(messages || []) this.setMessages(messages || [])
this.setTextFromProp(text) this.setTextFromProp(text)
} }
} }


Expand Down Expand Up @@ -655,7 +655,7 @@ class GiftedChat<TMessage extends IMessage = IMessage> extends React.Component<
this.props.onSend(newMessages) this.props.onSend(newMessages)
} }


setTimeout(() => this.scrollToBottom(false), 100) setTimeout(() => this.scrollToBottom(false), 200)


if (shouldResetInputToolbar === true) { if (shouldResetInputToolbar === true) {
setTimeout(() => { setTimeout(() => {
Expand All @@ -670,7 +670,7 @@ class GiftedChat<TMessage extends IMessage = IMessage> extends React.Component<
if (this.props.onQuickReply) { if (this.props.onQuickReply) {
this.props.onQuickReply(replies) this.props.onQuickReply(replies)
} }
setTimeout(() => this.scrollToBottom(false), 100) setTimeout(() => this.scrollToBottom(false), 200)
} }


resetInputToolbar() { resetInputToolbar() {
Expand Down

0 comments on commit 152ab3c

Please sign in to comment.