Do not close permalink view when post is deleted (#1987)
This commit is contained in:
parent
95ec582849
commit
80d206baf2
2 changed files with 1 additions and 6 deletions
|
|
@ -6,7 +6,6 @@ import {connect} from 'react-redux';
|
|||
|
||||
import {getChannel as getChannelAction, joinChannel, markChannelAsRead, markChannelAsViewed} from 'mattermost-redux/actions/channels';
|
||||
import {getPostsAfter, getPostsBefore, getPostThread, selectPost} from 'mattermost-redux/actions/posts';
|
||||
import {Posts} from 'mattermost-redux/constants';
|
||||
import {makeGetChannel, getMyChannelMemberships} from 'mattermost-redux/selectors/entities/channels';
|
||||
import {makeGetPostIdsAroundPost, getPost} from 'mattermost-redux/selectors/entities/posts';
|
||||
import {getTheme} from 'mattermost-redux/selectors/entities/preferences';
|
||||
|
|
@ -34,7 +33,7 @@ function makeMapStateToProps() {
|
|||
let channel;
|
||||
let postIds;
|
||||
|
||||
if (post && post.delete_at === 0 && post.state !== Posts.POST_DELETED) {
|
||||
if (post) {
|
||||
channel = getChannel(state, {id: post.channel_id});
|
||||
postIds = getPostIdsAroundPost(state, currentFocusedPostId, post.channel_id, {
|
||||
postsBeforeCount: 10,
|
||||
|
|
|
|||
|
|
@ -114,10 +114,6 @@ export default class Permalink extends PureComponent {
|
|||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
if (nextProps.channelId === '' && this.mounted) {
|
||||
this.handleClose();
|
||||
}
|
||||
|
||||
if (this.props.channelName !== nextProps.channelName && this.mounted) {
|
||||
this.setState({title: nextProps.channelName});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue