Fixing websocket connection issue. Refactoring websockets into an action creator.

Этот коммит содержится в:
Christopher Speller
2016-03-23 10:20:52 -04:00
родитель 6568e15023
Коммит 9239a7353a
11 изменённых файлов: 495 добавлений и 430 удалений

Просмотреть файл

@@ -19,7 +19,6 @@ import ChannelStore from 'stores/channel_store.jsx';
import PostStore from 'stores/post_store.jsx';
import UserStore from 'stores/user_store.jsx';
import PreferenceStore from 'stores/preference_store.jsx';
import SocketStore from 'stores/socket_store.jsx';
import Constants from 'utils/constants.jsx';
@@ -213,11 +212,7 @@ class CreatePost extends React.Component {
}
}
const t = Date.now();
if ((t - this.lastTime) > Constants.UPDATE_TYPING_MS) {
SocketStore.sendMessage({channel_id: this.state.channelId, action: 'typing', props: {parent_id: ''}, state: {}});
this.lastTime = t;
}
GlobalActions.emitLocalUserTypingEvent(this.state.channelId, '');
}
handleUserInput(messageText) {
this.setState({messageText});