Composer Quote UI (#35805)

Co-authored-by: diondiondion <mail@diondiondion.com>
This commit is contained in:
Echo 2025-08-18 18:52:28 +02:00 committed by GitHub
commit d4b2e7f771
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 107 additions and 10 deletions

View file

@ -11,9 +11,10 @@ const mapStateToProps = state => {
const attachmentsSize = readyAttachmentsSize + pendingAttachmentsSize;
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 hasQuote = !!state.compose.get('quoted_status_id');
return {
disabled: isPoll || isUploading || isOverLimit || hasVideoOrAudio,
disabled: isPoll || isUploading || isOverLimit || hasVideoOrAudio || hasQuote,
resetFileKey: state.getIn(['compose', 'resetFileKey']),
};
};