diff --git a/app/screens/channel_info/channel_info.js b/app/screens/channel_info/channel_info.js index e94933882..106f67fde 100644 --- a/app/screens/channel_info/channel_info.js +++ b/app/screens/channel_info/channel_info.js @@ -27,6 +27,7 @@ import ChannelInfoRow from './channel_info_row'; export default class ChannelInfo extends PureComponent { static propTypes = { actions: PropTypes.shape({ + clearPinnedPosts: PropTypes.func.isRequired, closeDMChannel: PropTypes.func.isRequired, closeGMChannel: PropTypes.func.isRequired, deleteChannel: PropTypes.func.isRequired, @@ -144,10 +145,11 @@ export default class ChannelInfo extends PureComponent { goToPinnedPosts = preventDoubleTap(() => { const {formatMessage} = this.context.intl; - const {currentChannel, navigator, theme} = this.props; + const {actions, currentChannel, navigator, theme} = this.props; const id = t('channel_header.pinnedPosts'); const defaultMessage = 'Pinned Posts'; + actions.clearPinnedPosts(currentChannel.id); navigator.push({ backButtonTitle: '', screen: 'PinnedPosts', diff --git a/app/screens/channel_info/index.js b/app/screens/channel_info/index.js index 322aa0fca..4f568e1ad 100644 --- a/app/screens/channel_info/index.js +++ b/app/screens/channel_info/index.js @@ -14,6 +14,7 @@ import { } from 'mattermost-redux/actions/channels'; import {getCustomEmojisInText} from 'mattermost-redux/actions/emojis'; import {selectFocusedPostId} from 'mattermost-redux/actions/posts'; +import {clearPinnedPosts} from 'mattermost-redux/actions/search'; import {General} from 'mattermost-redux/constants'; import {getTheme} from 'mattermost-redux/selectors/entities/preferences'; import { @@ -90,6 +91,7 @@ function mapStateToProps(state) { function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ + clearPinnedPosts, closeDMChannel, closeGMChannel, deleteChannel, diff --git a/package-lock.json b/package-lock.json index 0940097b1..b2e402a8f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8376,8 +8376,8 @@ "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=" }, "mattermost-redux": { - "version": "github:mattermost/mattermost-redux#b730595c859e61ebc04806967f2df27c60f0050a", - "from": "github:mattermost/mattermost-redux#b730595c859e61ebc04806967f2df27c60f0050a", + "version": "github:mattermost/mattermost-redux#9d9f430f46658cf9c84459cb8cca9efe632d165a", + "from": "github:mattermost/mattermost-redux#9d9f430f46658cf9c84459cb8cca9efe632d165a", "requires": { "deep-equal": "1.0.1", "eslint-plugin-header": "1.2.0", diff --git a/package.json b/package.json index 81585879e..3a728c8bb 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "intl": "1.2.5", "jail-monkey": "1.0.0", "jsc-android": "236355.1.0", - "mattermost-redux": "github:mattermost/mattermost-redux#b730595c859e61ebc04806967f2df27c60f0050a", + "mattermost-redux": "github:mattermost/mattermost-redux#9d9f430f46658cf9c84459cb8cca9efe632d165a", "mime-db": "1.37.0", "moment-timezone": "0.5.23", "prop-types": "15.6.2",