about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/compose/containers/options_container.js
diff options
context:
space:
mode:
authorReverite <github@reverite.sh>2019-05-21 20:48:57 -0700
committerReverite <github@reverite.sh>2019-05-21 20:48:57 -0700
commitd873e4f3d5878a2b2800758cbe3b9c870c228d51 (patch)
tree23a3a373699381d4bd4f629136b9c82de5df96a3 /app/javascript/flavours/glitch/features/compose/containers/options_container.js
parent4cea89bf2e9ce7f73fccfc637191b1e039ad25ee (diff)
parent2332b3f146b0d879daba8a99bd35c8bf425edea3 (diff)
Merge branch 'glitch' into production
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.js10
1 files changed, 9 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 2ac7ab8d8..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) {
@@ -17,6 +19,8 @@ function mapStateToProps (state) {
     allowMedia: !poll && (media ? media.size < 4 && !media.some(item => item.get('type') === 'video') : true),
     hasMedia: media && !!media.size,
     allowPoll: !(media && !!media.size),
+    showContentTypeChoice: state.getIn(['local_settings', 'show_content_type_choice']),
+    contentType: state.getIn(['compose', 'content_type']),
   };
 };
 
@@ -26,6 +30,10 @@ const mapDispatchToProps = (dispatch) => ({
     dispatch(changeComposeAdvancedOption(option, value));
   },
 
+  onChangeContentType(value) {
+    dispatch(changeComposeContentType(value));
+  },
+
   onTogglePoll() {
     dispatch((_, getState) => {
       if (getState().getIn(['compose', 'poll'])) {