diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-04-28 13:16:03 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-04-28 13:16:03 -0400 |
commit | 96906482cecb0df21c8e1a40a2ba00c13c0182a7 (patch) | |
tree | 3bb35ca9fe2a3beb212b5350116f7bb488d7a119 /webapp/root.jsx | |
parent | 302ec17beed9128101ef61d69b45d3ee29e16f1e (diff) | |
download | chat-96906482cecb0df21c8e1a40a2ba00c13c0182a7.tar.gz chat-96906482cecb0df21c8e1a40a2ba00c13c0182a7.tar.bz2 chat-96906482cecb0df21c8e1a40a2ba00c13c0182a7.zip |
PLT-6214 Move channel store and actions over to redux (#6235)
* Move channel store and actions over to redux
* Fix style errors
* Fix unit test
* Various fixes
* More fixes
* Revert config changes
Diffstat (limited to 'webapp/root.jsx')
-rw-r--r-- | webapp/root.jsx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/webapp/root.jsx b/webapp/root.jsx index b2da6a54c..6a63e6dad 100644 --- a/webapp/root.jsx +++ b/webapp/root.jsx @@ -16,9 +16,6 @@ import BrowserStore from 'stores/browser_store.jsx'; import ChannelStore from 'stores/channel_store.jsx'; import UserStore from 'stores/user_store.jsx'; import * as I18n from 'i18n/i18n.jsx'; -import * as AsyncClient from 'utils/async_client.jsx'; - -import {getClientConfig, getLicenseConfig, setUrl} from 'mattermost-redux/actions/general'; // Import our styles import 'bootstrap-colorpicker/dist/css/bootstrap-colorpicker.css'; @@ -26,7 +23,13 @@ import 'google-fonts/google-fonts.css'; import 'sass/styles.scss'; import 'katex/dist/katex.min.css'; +// Redux actions import store from 'stores/redux_store.jsx'; +const dispatch = store.dispatch; +const getState = store.getState; + +import {viewChannel} from 'mattermost-redux/actions/channels'; +import {getClientConfig, getLicenseConfig, setUrl} from 'mattermost-redux/actions/general'; // Import the root of our routing tree import rRoot from 'routes/route_root.jsx'; @@ -85,7 +88,7 @@ function preRenderSetup(callwhendone) { $(window).off('beforeunload'); BrowserStore.setLastServerVersion(''); if (UserStore.getCurrentUser()) { - AsyncClient.viewChannel('', ChannelStore.getCurrentId() || ''); + viewChannel('', ChannelStore.getCurrentId() || '')(dispatch, getState); } Websockets.close(); } |