2017-02-25 19:23:44 -05:00
|
|
|
import { connect } from 'react-redux';
|
2017-03-24 19:01:43 -04:00
|
|
|
import PrivacyDropdown from '../components/privacy_dropdown';
|
2017-02-25 19:23:44 -05:00
|
|
|
import { changeComposeVisibility } from '../../../actions/compose';
|
2017-07-27 16:31:59 -04:00
|
|
|
import { openModal, closeModal } from '../../../actions/modal';
|
|
|
|
import { isUserTouching } from '../../../is_mobile';
|
2017-02-25 19:23:44 -05:00
|
|
|
|
|
|
|
const mapStateToProps = state => ({
|
2017-05-20 11:31:47 -04:00
|
|
|
value: state.getIn(['compose', 'privacy']),
|
2017-02-25 19:23:44 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
|
|
|
2017-03-24 19:01:43 -04:00
|
|
|
onChange (value) {
|
|
|
|
dispatch(changeComposeVisibility(value));
|
2017-05-20 11:31:47 -04:00
|
|
|
},
|
2017-02-25 19:23:44 -05:00
|
|
|
|
2017-07-27 16:31:59 -04:00
|
|
|
isUserTouching,
|
|
|
|
onModalOpen: props => dispatch(openModal('ACTIONS', props)),
|
|
|
|
onModalClose: () => dispatch(closeModal()),
|
|
|
|
|
2017-02-25 19:23:44 -05:00
|
|
|
});
|
|
|
|
|
2017-03-24 19:01:43 -04:00
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(PrivacyDropdown);
|