diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-12-14 19:01:22 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-12-14 19:01:22 -0500 |
commit | 74f427fb1a5da8ccd0bbc4e4104830cfa12c70fb (patch) | |
tree | b063683a1ec022c3ccbb2561d30734e0a9156905 /web/react/dispatcher | |
parent | 6c7c04f38d0485dadcd7dd0ea2ba3a95bdfde448 (diff) | |
parent | f51d45f6cba0e5a1249146afe4a1c78cf32b7598 (diff) | |
download | chat-74f427fb1a5da8ccd0bbc4e4104830cfa12c70fb.tar.gz chat-74f427fb1a5da8ccd0bbc4e4104830cfa12c70fb.tar.bz2 chat-74f427fb1a5da8ccd0bbc4e4104830cfa12c70fb.zip |
Merge branch 'release-1.3'
Diffstat (limited to 'web/react/dispatcher')
-rw-r--r-- | web/react/dispatcher/event_helpers.jsx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/web/react/dispatcher/event_helpers.jsx b/web/react/dispatcher/event_helpers.jsx index 297367ce9..a03923c1a 100644 --- a/web/react/dispatcher/event_helpers.jsx +++ b/web/react/dispatcher/event_helpers.jsx @@ -4,11 +4,11 @@ import AppDispatcher from '../dispatcher/app_dispatcher.jsx'; import ChannelStore from '../stores/channel_store.jsx'; import PostStore from '../stores/post_store.jsx'; +import SearchStore from '../stores/search_store.jsx'; import Constants from '../utils/constants.jsx'; const ActionTypes = Constants.ActionTypes; import * as AsyncClient from '../utils/async_client.jsx'; import * as Client from '../utils/client.jsx'; -import * as Utils from '../utils/utils.jsx'; export function emitChannelClickEvent(channel) { AsyncClient.getChannels(true); @@ -39,28 +39,27 @@ export function emitPostFocusEvent(postId) { ); } -export function emitPostFocusRightHandSideEvent(post) { +export function emitPostFocusRightHandSideFromSearch(post, isMentionSearch) { Client.getPost( post.channel_id, post.id, (data) => { AppDispatcher.handleServerAction({ type: ActionTypes.RECIEVED_POST_SELECTED, - post_list: data + post_list: data, + from_search: SearchStore.getSearchTerm() }); AppDispatcher.handleServerAction({ type: ActionTypes.RECIEVED_SEARCH, - results: null + results: null, + is_mention_search: isMentionSearch }); }, (err) => { AsyncClient.dispatchError(err, 'getPost'); } ); - - var postChannel = ChannelStore.get(post.channel_id); - Utils.switchChannel(postChannel); } export function emitLoadMorePostsEvent() { |