Merge branch 'events' into 'develop'

ComposeEventModal: Set is_uploading to false after successsfully uploading banner

See merge request soapbox-pub/soapbox!1987
This commit is contained in:
marcin mikołajczak 2022-12-09 19:04:21 +00:00
commit 14b015a025
1 changed files with 3 additions and 1 deletions

View File

@ -71,7 +71,9 @@ export default function compose_event(state = ReducerRecord(), action: AnyAction
case EVENT_BANNER_UPLOAD_REQUEST: case EVENT_BANNER_UPLOAD_REQUEST:
return state.set('is_uploading', true); return state.set('is_uploading', true);
case EVENT_BANNER_UPLOAD_SUCCESS: case EVENT_BANNER_UPLOAD_SUCCESS:
return state.set('banner', normalizeAttachment(fromJS(action.media))); return state
.set('banner', normalizeAttachment(fromJS(action.media)))
.set('is_uploading', false);
case EVENT_BANNER_UPLOAD_FAIL: case EVENT_BANNER_UPLOAD_FAIL:
return state.set('is_uploading', false); return state.set('is_uploading', false);
case EVENT_BANNER_UPLOAD_UNDO: case EVENT_BANNER_UPLOAD_UNDO: