Skip to content

Commit

Permalink
Remove runAfterInteractions during init (#380)
Browse files Browse the repository at this point in the history
Fixes #377.
Fixes #228.
  • Loading branch information
iclems authored and cooperka committed Jul 8, 2017
1 parent f2df670 commit 713b458
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/GiftedChat.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import {
Animated,
InteractionManager,
Platform,
StyleSheet,
View,
Expand Down Expand Up @@ -377,13 +376,11 @@ class GiftedChat extends React.Component {
this.setMaxHeight(layout.height);
const newComposerHeight = MIN_COMPOSER_HEIGHT;
const newMessagesContainerHeight = this.getMessagesContainerHeightWithKeyboard(newComposerHeight);
GiftedChatInteractionManager.runAfterInteractions(() => {
this.setState({
isInitialized: true,
text: '',
composerHeight: newComposerHeight,
messagesContainerHeight: this.prepareMessagesContainerHeight(newMessagesContainerHeight),
});
this.setState({
isInitialized: true,
text: '',
composerHeight: newComposerHeight,
messagesContainerHeight: this.prepareMessagesContainerHeight(newMessagesContainerHeight),
});
}

Expand Down

0 comments on commit 713b458

Please sign in to comment.