Add support for editing media description and focus point of already-posted statuses (#20878)

* Add backend support for editing media attachments of existing posts

* Allow editing media attachments of already-posted toots

* Add tests
This commit is contained in:
Claire
2023-01-18 16:33:55 +01:00
committed by GitHub
parent d1387579b9
commit 4b92e59f4f
7 changed files with 83 additions and 11 deletions

View File

@ -444,7 +444,7 @@ export default function compose(state = initialState, action) {
.setIn(['media_modal', 'dirty'], false)
.update('media_attachments', list => list.map(item => {
if (item.get('id') === action.media.id) {
return fromJS(action.media).set('unattached', true);
return fromJS(action.media).set('unattached', !action.attached);
}
return item;