about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/compose/containers/options_container.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/flavours/glitch/features/compose/containers/options_container.js')
-rw-r--r--app/javascript/flavours/glitch/features/compose/containers/options_container.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/compose/containers/options_container.js b/app/javascript/flavours/glitch/features/compose/containers/options_container.js
index a9ad3a5e8..c8c7ecd43 100644
--- a/app/javascript/flavours/glitch/features/compose/containers/options_container.js
+++ b/app/javascript/flavours/glitch/features/compose/containers/options_container.js
@@ -2,8 +2,10 @@ import { connect } from 'react-redux';
 import Options from '../components/options';
 import {
   changeComposeAdvancedOption,
+  changeComposeContentType,
+  addPoll,
+  removePoll,
 } from 'flavours/glitch/actions/compose';
-import { addPoll, removePoll } from 'flavours/glitch/actions/compose';
 import { closeModal, openModal } from 'flavours/glitch/actions/modal';
 
 function mapStateToProps (state) {
@@ -18,6 +20,7 @@ function mapStateToProps (state) {
     hasMedia: media && !!media.size,
     allowPoll: !(media && !!media.size),
     showContentTypeChoice: state.getIn(['local_settings', 'show_content_type_choice']),
+    contentType: state.getIn(['compose', 'content_type']),
   };
 };
 
@@ -27,6 +30,10 @@ const mapDispatchToProps = (dispatch) => ({
     dispatch(changeComposeAdvancedOption(option, value));
   },
 
+  onChangeContentType(value) {
+    dispatch(changeComposeContentType(value));
+  },
+
   onTogglePoll() {
     dispatch((_, getState) => {
       if (getState().getIn(['compose', 'poll'])) {