Co-authored-by: tobi <tobi.smethurst@protonmail.com> Reviewed-on: https://codeberg.org/superseriousbusiness/masto-fe-standalone/pulls/88 Co-authored-by: Zoë Bijl <moiety@noreply.codeberg.org> Co-committed-by: Zoë Bijl <moiety@noreply.codeberg.org>
31 lines
795 B
JavaScript
31 lines
795 B
JavaScript
import { connect } from "react-redux";
|
|
|
|
import { changeComposeVisibility } from "../../../actions/compose";
|
|
import { openModal, closeModal } from "../../../actions/modal";
|
|
import { isUserTouching } from "../../../is_mobile";
|
|
import PrivacyDropdown from "../components/privacy_dropdown";
|
|
|
|
const mapStateToProps = state => ({
|
|
value: state.getIn(["compose", "privacy"]),
|
|
});
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
|
|
onChange (value) {
|
|
dispatch(changeComposeVisibility(value));
|
|
},
|
|
|
|
isUserTouching,
|
|
onModalOpen: props => dispatch(openModal({
|
|
modalType: "ACTIONS",
|
|
modalProps: props,
|
|
})),
|
|
onModalClose: () => dispatch(closeModal({
|
|
modalType: undefined,
|
|
ignoreFocus: false,
|
|
})),
|
|
|
|
});
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(PrivacyDropdown);
|