Browse Source

update: max_media_attachments follow server advertised value (#31616)

dariusk-working/4_3_0
HolgerHuo 2 years ago committed by GitHub
parent
commit
3c412578c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      app/javascript/mastodon/features/ui/index.jsx

2
app/javascript/mastodon/features/ui/index.jsx

@ -85,7 +85,7 @@ const mapStateToProps = state => ({
isComposing: state.getIn(['compose', 'is_composing']),
hasComposingText: state.getIn(['compose', 'text']).trim().length !== 0,
hasMediaAttachments: state.getIn(['compose', 'media_attachments']).size > 0,
canUploadMore: !state.getIn(['compose', 'media_attachments']).some(x => ['audio', 'video'].includes(x.get('type'))) && state.getIn(['compose', 'media_attachments']).size < 4,
canUploadMore: !state.getIn(['compose', 'media_attachments']).some(x => ['audio', 'video'].includes(x.get('type'))) && state.getIn(['compose', 'media_attachments']).size < state.getIn(['server', 'server', 'configuration', 'statuses', 'max_media_attachments']),
firstLaunch: state.getIn(['settings', 'introductionVersion'], 0) < INTRODUCTION_VERSION,
username: state.getIn(['accounts', me, 'username']),
});

Loading…
Cancel
Save