mirror of https://github.com/mastodon/mastodon
update button_container
This commit is contained in:
parent
7f0ca089a8
commit
5b209ad077
|
@ -9,7 +9,7 @@ const mapStateToProps = state => {
|
||||||
const readyAttachmentsSize = state.getIn(['compose', 'media_attachments']).size ?? 0;
|
const readyAttachmentsSize = state.getIn(['compose', 'media_attachments']).size ?? 0;
|
||||||
const pendingAttachmentsSize = state.getIn(['compose', 'pending_media_attachments']).size ?? 0;
|
const pendingAttachmentsSize = state.getIn(['compose', 'pending_media_attachments']).size ?? 0;
|
||||||
const attachmentsSize = readyAttachmentsSize + pendingAttachmentsSize;
|
const attachmentsSize = readyAttachmentsSize + pendingAttachmentsSize;
|
||||||
const isOverLimit = attachmentsSize > 3;
|
const isOverLimit = attachmentsSize > state.getIn(['server', 'server', 'configuration', 'statuses', 'max_media_attachments'])-1;
|
||||||
const hasVideoOrAudio = state.getIn(['compose', 'media_attachments']).some(m => ['video', 'audio'].includes(m.get('type')));
|
const hasVideoOrAudio = state.getIn(['compose', 'media_attachments']).some(m => ['video', 'audio'].includes(m.get('type')));
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue