Markdown refactoring
This commit is contained in:
@ -49,7 +49,6 @@ class ComposeForm extends ImmutablePureComponent {
|
||||
text: PropTypes.string.isRequired,
|
||||
suggestions: ImmutablePropTypes.list,
|
||||
spoiler: PropTypes.bool,
|
||||
content_type: PropTypes.string,
|
||||
privacy: PropTypes.string,
|
||||
spoilerText: PropTypes.string,
|
||||
focusDate: PropTypes.instanceOf(Date),
|
||||
|
||||
@ -16,7 +16,6 @@ const mapStateToProps = state => ({
|
||||
suggestions: state.getIn(['compose', 'suggestions']),
|
||||
spoiler: state.getIn(['compose', 'spoiler']),
|
||||
spoilerText: state.getIn(['compose', 'spoiler_text']),
|
||||
content_type: state.getIn(['compose', 'text/markdown']),
|
||||
privacy: state.getIn(['compose', 'privacy']),
|
||||
focusDate: state.getIn(['compose', 'focusDate']),
|
||||
caretPosition: state.getIn(['compose', 'caretPosition']),
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { connect } from 'react-redux';
|
||||
import TextIconButton from '../components/text_icon_button';
|
||||
import { changeComposeMarkdown } from '../../../actions/compose';
|
||||
import { changeComposeContentType } from '../../../actions/compose';
|
||||
import { injectIntl, defineMessages } from 'react-intl';
|
||||
|
||||
const messages = defineMessages({
|
||||
@ -18,7 +18,7 @@ const mapStateToProps = (state, { intl }) => ({
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
|
||||
onClick() {
|
||||
dispatch(changeComposeMarkdown(this.active ? 'text/plain' : 'text/markdown'));
|
||||
dispatch(changeComposeContentType(this.active ? 'text/plain' : 'text/markdown'));
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user