Merge remote-tracking branch 'origin/master'
This commit is contained in:
parent
fecd0bdc57
commit
681a649a82
|
@ -46,7 +46,7 @@ export default class RoomView extends React.Component {
|
|||
|
||||
this.state = {
|
||||
dataSource: this.getMessages(),
|
||||
loaded: false,
|
||||
loaded: true,
|
||||
joined: typeof props.navigation.state.params.rid === 'undefined'
|
||||
};
|
||||
|
||||
|
@ -54,9 +54,12 @@ export default class RoomView extends React.Component {
|
|||
}
|
||||
|
||||
componentWillMount() {
|
||||
const late = setTimeout(() => this.setState({
|
||||
loaded: false
|
||||
}), 1000);
|
||||
RocketChat.loadMessagesForRoom(this.rid, () => {
|
||||
clearTimeout(late);
|
||||
this.setState({
|
||||
...this.state,
|
||||
loaded: true
|
||||
});
|
||||
});
|
||||
|
|
|
@ -169,7 +169,7 @@ export default class RoomsListView extends React.Component {
|
|||
});
|
||||
}
|
||||
|
||||
_onPressItem = (id, item) => {
|
||||
_onPressItem = (id, item = {}) => {
|
||||
const { navigate } = this.props.navigation;
|
||||
|
||||
const clearSearch = () => {
|
||||
|
@ -222,7 +222,7 @@ export default class RoomsListView extends React.Component {
|
|||
}
|
||||
|
||||
renderItem = ({ item }) => (
|
||||
<TouchableOpacity onPress={() => this._onPressItem(item._id)}>
|
||||
<TouchableOpacity onPress={() => this._onPressItem(item._id, item)}>
|
||||
<RoomItem
|
||||
id={item._id}
|
||||
item={item}
|
||||
|
|
Loading…
Reference in New Issue