Add secondary toot button (opt-in) (#153)

Add secondary toot button + other toot button enhancements. 
Squashing so it's easy to revert if needed.
This commit is contained in:
Ondřej Hruška
2017-09-23 23:11:02 +02:00
committed by GitHub
parent 169d83f532
commit 67f8277526
5 changed files with 104 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
import { connect } from 'react-redux';
import ComposeForm from '../components/compose_form';
import { uploadCompose } from '../../../actions/compose';
import { changeComposeVisibility, uploadCompose } from '../../../actions/compose';
import {
changeCompose,
submitCompose,
@@ -25,6 +25,7 @@ const mapStateToProps = state => ({
is_uploading: state.getIn(['compose', 'is_uploading']),
me: state.getIn(['compose', 'me']),
showSearch: state.getIn(['search', 'submitted']) && !state.getIn(['search', 'hidden']),
settings: state.get('local_settings'),
});
const mapDispatchToProps = (dispatch) => ({
@@ -33,6 +34,10 @@ const mapDispatchToProps = (dispatch) => ({
dispatch(changeCompose(text));
},
onPrivacyChange (value) {
dispatch(changeComposeVisibility(value));
},
onSubmit () {
dispatch(submitCompose());
},