chinwagsocial/app/javascript/mastodon/features/direct_timeline/containers/column_settings_container.js
chr v1.x 4f42238c29 Put "Media Only" option in column settings instead of content area headline (#7801)
* Action/reducer for changing column settings takes a path and a value
instead of a javascript object

* Settings menu version and column headline version working simultaneously

* remove column headline entirely

* remove css for headlines that aren't possible now

* Remove commented out code from unfruitful attempt at this feature

* Give direct timeline its own column settings bc it doesn't have a media only option

* Fix typo in public timeline code that was preventing per-column settings from working properly

* Fix codeclimate issues

* Missing semicolons

* Use redux state to set onlyMedia, let that do the update instead of a callback. Consequently, unpinned setting works without history modification

* Unused import
2018-06-15 11:15:15 +02:00

18 lines
466 B
JavaScript

import { connect } from 'react-redux';
import ColumnSettings from '../components/column_settings';
import { changeSetting } from '../../../actions/settings';
const mapStateToProps = state => ({
settings: state.getIn(['settings', 'direct']),
});
const mapDispatchToProps = dispatch => ({
onChange (key, checked) {
dispatch(changeSetting(['direct', ...key], checked));
},
});
export default connect(mapStateToProps, mapDispatchToProps)(ColumnSettings);