|
|
@ -429,7 +429,7 @@ export default function compose(state = initialState, action) { |
|
|
|
case COMPOSE_UPLOAD_SUCCESS: |
|
|
|
case COMPOSE_UPLOAD_SUCCESS: |
|
|
|
return appendMedia(state, fromJS(action.media), action.file); |
|
|
|
return appendMedia(state, fromJS(action.media), action.file); |
|
|
|
case COMPOSE_UPLOAD_FAIL: |
|
|
|
case COMPOSE_UPLOAD_FAIL: |
|
|
|
return state.set('is_uploading', false).update('pending_media_attachments', n => action.decrement ? n - 1 : n); |
|
|
|
return state.set('is_uploading', false).update('pending_media_attachments', n => n - 1); |
|
|
|
case COMPOSE_UPLOAD_UNDO: |
|
|
|
case COMPOSE_UPLOAD_UNDO: |
|
|
|
return removeMedia(state, action.media_id); |
|
|
|
return removeMedia(state, action.media_id); |
|
|
|
case COMPOSE_UPLOAD_PROGRESS: |
|
|
|
case COMPOSE_UPLOAD_PROGRESS: |
|
|
|