Skip to content

Commit

Permalink
Merge pull request botman#4 from mohsinht/patch-4
Browse files Browse the repository at this point in the history
Update State using setState()
  • Loading branch information
ranrinc authored Apr 11, 2019
2 parents 745776f + 010bef7 commit 6c3330b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chat/messages/typing-indicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default class TypingIndicator extends MessageType {

onVisibilityChange = () => {
setTimeout(() => {
this.state.visible = false;
this.setState( { visible: false } );
this.props.onVisibilityChange(this.props.message, this.state);
}, this.props.message.timeout * 1000);
};
Expand Down

0 comments on commit 6c3330b

Please sign in to comment.