PLT-1418 Adding old style replying in RHS

Этот коммит содержится в:
=Corey Hulen
2015-12-08 12:29:12 -08:00
родитель 59e4471a63
Коммит 8b29404525
3 изменённых файлов: 54 добавлений и 2 удалений

Просмотреть файл

@@ -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);