summaryrefslogtreecommitdiffstats
path: root/web/react/dispatcher
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-12-08 12:29:12 -0800
committer=Corey Hulen <corey@hulen.com>2015-12-08 12:29:12 -0800
commit8b29404525f036633be6b25dc18c536d2aafee02 (patch)
tree6db4158ca20f09e282ffb31a1a8e29f5473ac513 /web/react/dispatcher
parent59e4471a63253a1b11a2964ae3b0ee479e6667eb (diff)
downloadchat-8b29404525f036633be6b25dc18c536d2aafee02.tar.gz
chat-8b29404525f036633be6b25dc18c536d2aafee02.tar.bz2
chat-8b29404525f036633be6b25dc18c536d2aafee02.zip
PLT-1418 Adding old style replying in RHS
Diffstat (limited to 'web/react/dispatcher')
-rw-r--r--web/react/dispatcher/event_helpers.jsx25
1 files changed, 25 insertions, 0 deletions
diff --git a/web/react/dispatcher/event_helpers.jsx b/web/react/dispatcher/event_helpers.jsx
index 306c59e8b..bc1132765 100644
--- a/web/react/dispatcher/event_helpers.jsx
+++ b/web/react/dispatcher/event_helpers.jsx
@@ -8,6 +8,7 @@ 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);
@@ -38,6 +39,30 @@ export function emitPostFocusEvent(postId) {
);
}
+export function emitPostFocusRightHandSideEvent(post) {
+ Client.getPost(
+ post.channel_id,
+ post.id,
+ (data) => {
+ AppDispatcher.handleServerAction({
+ type: ActionTypes.RECIEVED_POST_SELECTED,
+ post_list: data
+ });
+
+ AppDispatcher.handleServerAction({
+ type: ActionTypes.RECIEVED_SEARCH,
+ results: null
+ });
+ },
+ (err) => {
+ AsyncClient.dispatchError(err, 'getPost');
+ }
+ );
+
+ var postChannel = ChannelStore.get(post.channel_id);
+ Utils.switchChannel(postChannel);
+}
+
export function emitLoadMorePostsEvent() {
const id = ChannelStore.getCurrentId();
loadMorePostsTop(id);