diff options
Diffstat (limited to 'webapp/components/post_view/components/pending_post_options.jsx')
-rw-r--r-- | webapp/components/post_view/components/pending_post_options.jsx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/webapp/components/post_view/components/pending_post_options.jsx b/webapp/components/post_view/components/pending_post_options.jsx index 711ea832c..44f4794ef 100644 --- a/webapp/components/post_view/components/pending_post_options.jsx +++ b/webapp/components/post_view/components/pending_post_options.jsx @@ -4,11 +4,10 @@ import PostStore from 'stores/post_store.jsx'; import ChannelStore from 'stores/channel_store.jsx'; -import AppDispatcher from 'dispatcher/app_dispatcher.jsx'; +import {loadPosts} from 'actions/post_actions.jsx'; +import AppDispatcher from 'dispatcher/app_dispatcher.jsx'; import Client from 'client/web_client.jsx'; -import * as AsyncClient from 'utils/async_client.jsx'; - import Constants from 'utils/constants.jsx'; const ActionTypes = Constants.ActionTypes; @@ -29,13 +28,13 @@ export default class PendingPostOptions extends React.Component { var post = this.props.post; Client.createPost(post, (data) => { - AsyncClient.getPosts(post.channel_id); + loadPosts(post.channel_id); var channel = ChannelStore.get(post.channel_id); - var member = ChannelStore.getMember(post.channel_id); + var member = ChannelStore.getMyMember(post.channel_id); member.msg_count = channel.total_msg_count; member.last_viewed_at = (new Date()).getTime(); - ChannelStore.setChannelMember(member); + ChannelStore.storeMyChannelMember(member); AppDispatcher.handleServerAction({ type: ActionTypes.RECEIVED_POST, |