Read room on open
This commit is contained in:
parent
8e67e75a09
commit
a4fda1820b
|
@ -10,6 +10,7 @@ const get = function* get({ rid }) {
|
|||
}
|
||||
try {
|
||||
yield RocketChat.loadMessagesForRoom(rid, null);
|
||||
yield RocketChat.readMessages(rid);
|
||||
yield put(messagesSuccess());
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
|
|
|
@ -105,7 +105,7 @@ export default class RoomView extends React.Component {
|
|||
this.state.dataSource = ds.cloneWithRows(this.data);
|
||||
}
|
||||
componentDidMount() {
|
||||
InteractionManager.runAfterInteractions(() => RocketChat.readMessages(this.rid));
|
||||
|
||||
}
|
||||
componentDidUpdate() {
|
||||
return !this.props.loading && clearTimeout(this.timer);
|
||||
|
|
Loading…
Reference in New Issue