var React = require('react'); var Postboard = require("../common/Postboard.js"); var NewPostModalButton = require("../home/NewPostModalButton.js"); var SetIntervalMixin = require("../common/SetIntervalMixin.js"); var StreamMixin = require("../common/StreamMixin.js"); var SafeStateChangeMixin = require('../common/SafeStateChangeMixin.js'); var EventListenerMixin = require('../common/EventListenerMixin.js'); var AppSettingsMixin = require('../common/AppSettingsMixin.js'); var ReactBootstrap = require('react-bootstrap') , NavItem = ReactBootstrap.NavItem , Nav = ReactBootstrap.Nav , ListGroup = ReactBootstrap.ListGroup , ListGroupItem = ReactBootstrap.ListGroupItem , Panel = ReactBootstrap.Panel , Glyphicon = ReactBootstrap.Glyphicon , Button = ReactBootstrap.Button module.exports = Home = React.createClass({ mixins: [ AppSettingsMixin, StreamMixin, SetIntervalMixin, SafeStateChangeMixin, EventListenerMixin('scrolledtobottom'), EventListenerMixin('newpostbyuser') ], getInitialState: function() { return { data: [], postIdentifiers: {}, usernames: [], postrange: ( Date.now()/1000 - 12*60*60 ), min_posts: 30, loading: true }; }, addUser: function(username) { var thisComponent = this; this.setStateSafe(function(previousState, currentProps){ previousState.usernames.push(username); return previousState; },function(){ Twister.getUser(username).doLatestPostsUntil(function(post){ if(post.getTimestamp() Home } loading={this.state.loading} activeAccount={this.props.activeAccount}/> ); } });