Composer Quote UI (#35805)
Co-authored-by: diondiondion <mail@diondiondion.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user