From 15cc7ccafc745be683cbe9c98409187ecb6a1784 Mon Sep 17 00:00:00 2001
From: =Corey Hulen <corey@hulen.com>
Date: Thu, 10 Dec 2015 14:37:15 -0800
Subject: PLT-1472 Adding back button to search click through

---
 web/react/dispatcher/event_helpers.jsx | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

(limited to 'web/react/dispatcher/event_helpers.jsx')

diff --git a/web/react/dispatcher/event_helpers.jsx b/web/react/dispatcher/event_helpers.jsx
index bc1132765..862ff3594 100644
--- a/web/react/dispatcher/event_helpers.jsx
+++ b/web/react/dispatcher/event_helpers.jsx
@@ -4,6 +4,7 @@
 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';
@@ -39,28 +40,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() {
-- 
cgit v1.2.3-1-g7c22


From 5472bafb57a6e34f057b4b03d69f0aaa290ac019 Mon Sep 17 00:00:00 2001
From: =Corey Hulen <corey@hulen.com>
Date: Thu, 10 Dec 2015 14:51:46 -0800
Subject: Fixing eslint error

---
 web/react/dispatcher/event_helpers.jsx | 1 -
 1 file changed, 1 deletion(-)

(limited to 'web/react/dispatcher/event_helpers.jsx')

diff --git a/web/react/dispatcher/event_helpers.jsx b/web/react/dispatcher/event_helpers.jsx
index 862ff3594..fa4d1d64f 100644
--- a/web/react/dispatcher/event_helpers.jsx
+++ b/web/react/dispatcher/event_helpers.jsx
@@ -9,7 +9,6 @@ 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);
-- 
cgit v1.2.3-1-g7c22

