summaryrefslogtreecommitdiffstats
path: root/web/react/dispatcher/event_helpers.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-12-11 09:57:52 -0500
committerChristopher Speller <crspeller@gmail.com>2015-12-11 09:57:52 -0500
commit129a532c508eb302111afc730162058203b2cde9 (patch)
tree48efa3d578dcc41c17fb9c002c018eb903f38de8 /web/react/dispatcher/event_helpers.jsx
parentb9a785e47d0cf1857eb8d0682a2642c0a05d29d9 (diff)
parent1408700f01ad6410d20f33ead079b59daa7be1a2 (diff)
downloadchat-129a532c508eb302111afc730162058203b2cde9.tar.gz
chat-129a532c508eb302111afc730162058203b2cde9.tar.bz2
chat-129a532c508eb302111afc730162058203b2cde9.zip
Merge pull request #1701 from mattermost/PLT-1472
PLT-1472 Adding back button to search click through
Diffstat (limited to 'web/react/dispatcher/event_helpers.jsx')
-rw-r--r--web/react/dispatcher/event_helpers.jsx13
1 files changed, 6 insertions, 7 deletions
diff --git a/web/react/dispatcher/event_helpers.jsx b/web/react/dispatcher/event_helpers.jsx
index bc1132765..fa4d1d64f 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() {