From b19fce9530ce89c54b235e1588f74e5d6e97ef82 Mon Sep 17 00:00:00 2001 From: Essem Date: Tue, 28 Nov 2023 23:33:17 -0600 Subject: [PATCH] Allow posting media alongside polls --- .../glitch/features/compose/containers/poll_button_container.js | 2 +- .../features/compose/containers/upload_button_container.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/flavours/glitch/features/compose/containers/poll_button_container.js b/app/javascript/flavours/glitch/features/compose/containers/poll_button_container.js index 9de388f64a..a9b558468b 100644 --- a/app/javascript/flavours/glitch/features/compose/containers/poll_button_container.js +++ b/app/javascript/flavours/glitch/features/compose/containers/poll_button_container.js @@ -4,7 +4,7 @@ import { addPoll, removePoll } from '../../../actions/compose'; import PollButton from '../components/poll_button'; const mapStateToProps = state => ({ - disabled: state.getIn(['compose', 'is_uploading']) || (state.getIn(['compose', 'media_attachments']).size > 0), + disabled: state.getIn(['compose', 'is_uploading']), active: state.getIn(['compose', 'poll']) !== null, }); diff --git a/app/javascript/flavours/glitch/features/compose/containers/upload_button_container.js b/app/javascript/flavours/glitch/features/compose/containers/upload_button_container.js index 7c4757b6c3..d52ef8304b 100644 --- a/app/javascript/flavours/glitch/features/compose/containers/upload_button_container.js +++ b/app/javascript/flavours/glitch/features/compose/containers/upload_button_container.js @@ -4,7 +4,7 @@ import { uploadCompose } from '../../../actions/compose'; import UploadButton from '../components/upload_button'; const mapStateToProps = state => ({ - disabled: state.getIn(['compose', 'poll']) !== null || state.getIn(['compose', 'is_uploading']) || (state.getIn(['compose', 'media_attachments']).size + state.getIn(['compose', 'pending_media_attachments']) > 3 || state.getIn(['compose', 'media_attachments']).some(m => ['video', 'audio'].includes(m.get('type')))), + disabled: state.getIn(['compose', 'is_uploading']) || (state.getIn(['compose', 'media_attachments']).size + state.getIn(['compose', 'pending_media_attachments']) > 3 || state.getIn(['compose', 'media_attachments']).some(m => ['video', 'audio'].includes(m.get('type')))), resetFileKey: state.getIn(['compose', 'resetFileKey']), });