diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-08-18 09:19:29 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-08-18 09:19:29 -0400 |
commit | 532be141bae8ff2ea03de4fa54affd6e72dab9ea (patch) | |
tree | fb0f76405960217477f4f91212da395543b84657 /web/react/components/channel_loader.jsx | |
parent | 4805608cc9cf79277f37b94bbe38398816469884 (diff) | |
parent | f4c2a9244c72786cc9a90597d9cb373e0cfee4c7 (diff) | |
download | chat-532be141bae8ff2ea03de4fa54affd6e72dab9ea.tar.gz chat-532be141bae8ff2ea03de4fa54affd6e72dab9ea.tar.bz2 chat-532be141bae8ff2ea03de4fa54affd6e72dab9ea.zip |
Merge pull request #380 from mattermost/mm-319
MM-319 adding pending post functionality to the client
Diffstat (limited to 'web/react/components/channel_loader.jsx')
-rw-r--r-- | web/react/components/channel_loader.jsx | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/web/react/components/channel_loader.jsx b/web/react/components/channel_loader.jsx index 6b80f6012..525b67b5c 100644 --- a/web/react/components/channel_loader.jsx +++ b/web/react/components/channel_loader.jsx @@ -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() { |