diff --git a/webapp/channels/src/components/edit_post/edit_post.tsx b/webapp/channels/src/components/edit_post/edit_post.tsx index e4a5a92f00..81e6e570b3 100644 --- a/webapp/channels/src/components/edit_post/edit_post.tsx +++ b/webapp/channels/src/components/edit_post/edit_post.tsx @@ -42,7 +42,6 @@ export type Actions = { unsetEditingPost: () => void; openModal: (input: ModalData) => void; scrollPostListToBottom: () => void; - getPostEditHistory: (postId: string) => void; } export type Props = { @@ -271,9 +270,6 @@ const EditPost = ({editingPost, actions, canEditPost, config, channelId, draft, } await actions.editPost(updatedPost as Post); - if (rest.isRHSOpened && rest.isEditHistoryShowing) { - actions.getPostEditHistory(editingPost.postId || ''); - } handleAutomatedRefocusAndExit(); }; diff --git a/webapp/channels/src/components/edit_post/index.ts b/webapp/channels/src/components/edit_post/index.ts index 16310d9a12..78e7a7aac3 100644 --- a/webapp/channels/src/components/edit_post/index.ts +++ b/webapp/channels/src/components/edit_post/index.ts @@ -4,7 +4,7 @@ import {connect} from 'react-redux'; import {ActionCreatorsMapObject, bindActionCreators, Dispatch} from 'redux'; -import {addMessageIntoHistory, getPostEditHistory} from 'mattermost-redux/actions/posts'; +import {addMessageIntoHistory} from 'mattermost-redux/actions/posts'; import {Preferences, Permissions} from 'mattermost-redux/constants'; import {getConfig} from 'mattermost-redux/selectors/entities/general'; import {getChannel} from 'mattermost-redux/selectors/entities/channels'; @@ -67,7 +67,6 @@ function mapDispatchToProps(dispatch: Dispatch) { setDraft: setGlobalItem, unsetEditingPost, openModal, - getPostEditHistory, }, dispatch), }; } diff --git a/webapp/channels/src/components/post_edit_history/__snapshots__/post_edit_history.test.tsx.snap b/webapp/channels/src/components/post_edit_history/__snapshots__/post_edit_history.test.tsx.snap index fd443bcf0d..8855c71414 100644 --- a/webapp/channels/src/components/post_edit_history/__snapshots__/post_edit_history.test.tsx.snap +++ b/webapp/channels/src/components/post_edit_history/__snapshots__/post_edit_history.test.tsx.snap @@ -1,125 +1,391 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`components/post_edit_history should match snapshot 1`] = ` -
- +