Fixing websocket connection issue. Refactoring websockets into an action creator.
Этот коммит содержится в:
@@ -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});
|
||||
|
||||
Ссылка в новой задаче
Block a user