Automatically display new Direct Messages

This commit is contained in:
2019-11-22 18:21:52 -05:00
parent 331509da7f
commit 445687cc54
2 changed files with 14 additions and 3 deletions

View File

@@ -207,7 +207,7 @@ export class directMessages extends Component {
componentDidMount() {
this.props.getDirectMessages();
// this.updatePage();
this.updatePage();
}
// Updates the state whenever redux is updated
@@ -230,6 +230,7 @@ export class directMessages extends Component {
updatePage = async() => {
while (true) {
await this.sleep(15000);
// console.log("getting new DMs");
this.props.getNewDirectMessages();
}
}