finalize implenetation of predictive client posts so that users get immediate feedback after posting
Этот коммит содержится в:
@@ -9,6 +9,7 @@ var BrowserStore = require('../stores/browser_store.jsx');
|
||||
var AsyncClient = require('../utils/async_client.jsx');
|
||||
var SocketStore = require('../stores/socket_store.jsx');
|
||||
var ChannelStore = require('../stores/channel_store.jsx');
|
||||
var PostStore = require('../stores/post_store.jsx');
|
||||
var Constants = require('../utils/constants.jsx');
|
||||
|
||||
module.exports = React.createClass({
|
||||
@@ -24,20 +25,24 @@ module.exports = React.createClass({
|
||||
AsyncClient.getMyTeam();
|
||||
/* End of async loads */
|
||||
|
||||
/* Perform pending post clean-up */
|
||||
PostStore.clearPendingPosts();
|
||||
/* End pending post clean-up */
|
||||
|
||||
/* Start interval functions */
|
||||
setInterval(function(){AsyncClient.getStatuses();}, 30000);
|
||||
setInterval(
|
||||
function pollStatuses() {
|
||||
AsyncClient.getStatuses();
|
||||
}, 30000);
|
||||
/* End interval functions */
|
||||
|
||||
|
||||
/* Start device tracking setup */
|
||||
var iOS = /(iPad|iPhone|iPod)/g.test( navigator.userAgent );
|
||||
var iOS = (/(iPad|iPhone|iPod)/g).test(navigator.userAgent);
|
||||
if (iOS) {
|
||||
$("body").addClass("ios");
|
||||
$('body').addClass('ios');
|
||||
}
|
||||
/* End device tracking setup */
|
||||
|
||||
|
||||
/* Start window active tracking setup */
|
||||
window.isActive = true;
|
||||
|
||||
@@ -57,7 +62,7 @@ module.exports = React.createClass({
|
||||
},
|
||||
_onSocketChange: function(msg) {
|
||||
if (msg && msg.user_id) {
|
||||
UserStore.setStatus(msg.user_id, "online");
|
||||
UserStore.setStatus(msg.user_id, 'online');
|
||||
}
|
||||
},
|
||||
render: function() {
|
||||
|
||||
Ссылка в новой задаче
Block a user