dismiss deleted message in RHS (#6914)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
6a056a0042
Коммит
b1322746d2
@@ -2,7 +2,9 @@
|
||||
// See License.txt for license information.
|
||||
|
||||
import {connect} from 'react-redux';
|
||||
import {bindActionCreators} from 'redux';
|
||||
import {getPost, makeGetPostsForThread} from 'mattermost-redux/selectors/entities/posts';
|
||||
import {removePost} from 'mattermost-redux/actions/posts';
|
||||
|
||||
import RhsThread from './rhs_thread.jsx';
|
||||
|
||||
@@ -24,4 +26,12 @@ function makeMapStateToProps() {
|
||||
};
|
||||
}
|
||||
|
||||
export default connect(makeMapStateToProps)(RhsThread);
|
||||
function mapDispatchToProps(dispatch) {
|
||||
return {
|
||||
actions: bindActionCreators({
|
||||
removePost
|
||||
}, dispatch)
|
||||
};
|
||||
}
|
||||
|
||||
export default connect(makeMapStateToProps, mapDispatchToProps)(RhsThread);
|
||||
|
||||
@@ -59,7 +59,10 @@ export default class RhsThread extends React.Component {
|
||||
currentUser: PropTypes.object.isRequired,
|
||||
useMilitaryTime: PropTypes.bool.isRequired,
|
||||
toggleSize: PropTypes.func,
|
||||
shrink: PropTypes.func
|
||||
shrink: PropTypes.func,
|
||||
actions: PropTypes.shape({
|
||||
removePost: PropTypes.func.isRequired
|
||||
}).isRequired
|
||||
}
|
||||
|
||||
static defaultProps = {
|
||||
@@ -401,6 +404,7 @@ export default class RhsThread extends React.Component {
|
||||
status={status}
|
||||
isBusy={this.state.isBusy}
|
||||
getPostList={this.getPostListContainer}
|
||||
removePost={this.props.actions.removePost}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
Ссылка в новой задаче
Block a user