diff options
author | ThibG <thib@sitedethib.com> | 2019-11-07 21:15:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-07 21:15:22 +0100 |
commit | 707c4918b21d19dd53b64120dbc7263f45fc5ecd (patch) | |
tree | dc7192652965f075a2ff59c0dd9c7989eaacbd72 /app/javascript/flavours/glitch/features | |
parent | dd2ec970dbe39f09d3da32d6a8f524aaad68a9d6 (diff) | |
parent | 04125c9c0d418a51b21ab6706f49434b4c8cdc8e (diff) |
Merge pull request #1243 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/flavours/glitch/features')
-rw-r--r-- | app/javascript/flavours/glitch/features/compose/containers/options_container.js | 3 |
1 files changed, 2 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 df842f3bf..c792aa582 100644 --- a/app/javascript/flavours/glitch/features/compose/containers/options_container.js +++ b/app/javascript/flavours/glitch/features/compose/containers/options_container.js @@ -12,11 +12,12 @@ function mapStateToProps (state) { const spoilersAlwaysOn = state.getIn(['local_settings', 'always_show_spoilers_field']); const poll = state.getIn(['compose', 'poll']); const media = state.getIn(['compose', 'media_attachments']); + const pending_media = state.getIn(['compose', 'pending_media_attachments']); return { acceptContentTypes: state.getIn(['media_attachments', 'accept_content_types']).toArray().join(','), resetFileKey: state.getIn(['compose', 'resetFileKey']), hasPoll: !!poll, - allowMedia: !poll && (media ? media.size < 4 && !media.some(item => ['video', 'audio'].includes(item.get('type'))) : true), + allowMedia: !poll && (media ? media.size + pending_media < 4 && !media.some(item => ['video', 'audio'].includes(item.get('type'))) : pending_media < 4), hasMedia: media && !!media.size, allowPoll: !(media && !!media.size), showContentTypeChoice: state.getIn(['local_settings', 'show_content_type_choice']), |