mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
call as anonymous method
This commit is contained in:
parent
7917f15874
commit
ffa6b7d376
1 changed files with 8 additions and 6 deletions
|
@ -43,9 +43,10 @@ var Navigation = React.createClass({
|
|||
},
|
||||
componentDidMount: function () {
|
||||
if (this.props.session.session.user) {
|
||||
var intervalId = setInterval(
|
||||
this.props.dispatch(messageCountActions.getCount(this.props.session.session.user.username)), 120000
|
||||
); // check for new messages every 2 mins.
|
||||
var intervalId = setInterval(function () {
|
||||
this.props.dispatch(messageCountActions.getCount(this.props.session.session.user.username));
|
||||
console.log('did things');
|
||||
}.bind(this), 120000); // check for new messages every 2 mins.
|
||||
this.setState({'messageCountIntervalId': intervalId});
|
||||
}
|
||||
},
|
||||
|
@ -56,9 +57,10 @@ var Navigation = React.createClass({
|
|||
'accountNavOpen': false
|
||||
});
|
||||
if (this.props.session.session.user) {
|
||||
var intervalId = setInterval(
|
||||
this.props.dispatch(messageCountActions.getCount(this.props.session.session.user.username)), 120000
|
||||
); // check for new messages every 2 mins.
|
||||
var intervalId = setInterval(function () {
|
||||
this.props.dispatch(messageCountActions.getCount(this.props.session.session.user.username));
|
||||
console.log('did things');
|
||||
}.bind(this), 120000); // check for new messages every 2 mins.
|
||||
this.setState({'messageCountIntervalId': intervalId});
|
||||
} else {
|
||||
// clear message count check, and set to default id.
|
||||
|
|
Loading…
Reference in a new issue