Fix room resize with keyboard

This commit is contained in:
Rodrigo Nascimento 2017-08-14 11:15:37 -03:00
parent 838f4b0fe0
commit 6181c6986e
4 changed files with 6 additions and 6 deletions

View File

@ -158,7 +158,7 @@ const RocketChat = {
});
},
loginWithPassword({username, password, code}, callback) {
loginWithPassword({ username, password, code }, callback) {
let params = {};
const state = reduxStore.getState();

View File

@ -80,7 +80,7 @@ export default class LoginView extends React.Component {
username: this.state.username,
password: this.state.password,
code: this.state.code
}
};
RocketChat.loginWithPassword(credentials, (error) => {
if (error) {

View File

@ -11,7 +11,8 @@ import RocketChat from '../lib/rocketchat';
import debounce from '../utils/throttle';
import Message from '../components/Message';
import MessageBox from '../components/MessageBox';
// import KeyboardView from '../components/KeyboardView';
import KeyboardView from '../components/KeyboardView';
const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 });
const styles = StyleSheet.create({
container: {
@ -198,7 +199,7 @@ export default class RoomView extends React.Component {
// keyExtractor={item => item._id}
//
return (
<View style={styles.container}>
<KeyboardView style={styles.container} keyboardVerticalOffset={64}>
{this.renderBanner()}
<ListView
enableEmptySections
@ -210,7 +211,7 @@ export default class RoomView extends React.Component {
renderRow={item => this.renderItem({ item })}
/>
{this.renderFooter()}
</View>
</KeyboardView>
);
}
}

View File

@ -174,7 +174,6 @@ export default class NewServerView extends React.Component {
});
reject(url);
});
} else {
this.setState({
validInstance: undefined