2
0

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
parent 28bf811a07
commit d4b2e7f771
12 changed files with 107 additions and 10 deletions

View File

@@ -331,8 +331,16 @@ export const composeReducer = (state = initialState, action) => {
return state.set('is_changing_upload', false);
} else if (quoteComposeByStatus.match(action)) {
const status = action.payload;
if (status.getIn(['quote_approval', 'current_user']) === 'automatic') {
return state.set('quoted_status_id', status.get('id'));
if (
status.getIn(['quote_approval', 'current_user']) === 'automatic' &&
state.get('media_attachments').size === 0 &&
!state.get('is_uploading') &&
!state.get('poll')
) {
return state
.set('quoted_status_id', status.get('id'))
.set('spoiler', status.get('sensitive'))
.set('spoiler_text', status.get('spoiler_text'));
}
} else if (quoteComposeCancel.match(action)) {
return state.set('quoted_status_id', null);