MM-14345: Changes the channelIsReadOnly prop to be associated to the post's channel rather than the current channel. Show the unpin regardless of whether a channel is read-only. (#2656)
This commit is contained in:
parent
c3a1e3561e
commit
7423e7d3bf
1 changed files with 2 additions and 2 deletions
|
|
@ -6,7 +6,7 @@ import {bindActionCreators} from 'redux';
|
|||
|
||||
import {createPost, removePost} from 'mattermost-redux/actions/posts';
|
||||
import {Posts} from 'mattermost-redux/constants';
|
||||
import {isCurrentChannelReadOnly} from 'mattermost-redux/selectors/entities/channels';
|
||||
import {isChannelReadOnlyById} from 'mattermost-redux/selectors/entities/channels';
|
||||
import {getPost, makeGetCommentCountForPost, makeIsPostCommentMention} from 'mattermost-redux/selectors/entities/posts';
|
||||
import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users';
|
||||
import {getMyPreferences, getTheme} from 'mattermost-redux/selectors/entities/preferences';
|
||||
|
|
@ -71,7 +71,7 @@ function makeMapStateToProps() {
|
|||
}
|
||||
|
||||
return {
|
||||
channelIsReadOnly: isCurrentChannelReadOnly(state),
|
||||
channelIsReadOnly: isChannelReadOnlyById(state, post.channel_id),
|
||||
currentUserId,
|
||||
post,
|
||||
isFirstReply,
|
||||
|
|
|
|||
Loading…
Reference in a new issue