2017-02-26 11:23:44 +11:00
|
|
|
import { connect } from 'react-redux';
|
2023-05-24 01:15:17 +10:00
|
|
|
|
2017-02-26 11:23:44 +11:00
|
|
|
import { changeComposeVisibility } from '../../../actions/compose';
|
2017-07-28 06:31:59 +10:00
|
|
|
import { openModal, closeModal } from '../../../actions/modal';
|
|
|
|
import { isUserTouching } from '../../../is_mobile';
|
2023-05-24 01:15:17 +10:00
|
|
|
import PrivacyDropdown from '../components/privacy_dropdown';
|
2017-02-26 11:23:44 +11:00
|
|
|
|
|
|
|
const mapStateToProps = state => ({
|
2017-05-21 01:31:47 +10:00
|
|
|
value: state.getIn(['compose', 'privacy']),
|
2017-02-26 11:23:44 +11:00
|
|
|
});
|
|
|
|
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
|
|
|
2017-03-25 10:01:43 +11:00
|
|
|
onChange (value) {
|
|
|
|
dispatch(changeComposeVisibility(value));
|
2017-05-21 01:31:47 +10:00
|
|
|
},
|
2017-02-26 11:23:44 +11:00
|
|
|
|
2017-07-28 06:31:59 +10:00
|
|
|
isUserTouching,
|
2023-05-25 23:42:37 +10:00
|
|
|
onModalOpen: props => dispatch(openModal({
|
|
|
|
modalType: 'ACTIONS',
|
|
|
|
modalProps: props,
|
|
|
|
})),
|
|
|
|
onModalClose: () => dispatch(closeModal({
|
|
|
|
modalType: undefined,
|
|
|
|
ignoreFocus: false,
|
|
|
|
})),
|
2017-07-28 06:31:59 +10:00
|
|
|
|
2017-02-26 11:23:44 +11:00
|
|
|
});
|
|
|
|
|
2017-03-25 10:01:43 +11:00
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(PrivacyDropdown);
|