From 2d54986a03675dbad940948177037ce2f12d11b9 Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 14 Nov 2022 17:52:31 +0100 Subject: [PATCH 1/2] Fix media metadata being only editable once (#20665) --- app/javascript/mastodon/reducers/compose.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/mastodon/reducers/compose.js b/app/javascript/mastodon/reducers/compose.js index afb8b40c1..8cc7bf520 100644 --- a/app/javascript/mastodon/reducers/compose.js +++ b/app/javascript/mastodon/reducers/compose.js @@ -436,7 +436,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); + return fromJS(action.media).set('unattached', true); } return item; From 96c1ef6d5075cdab9c4340e4b999737e3c7d1589 Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 14 Nov 2022 17:52:31 +0100 Subject: [PATCH 2/2] [Glitch] Fix media metadata being only editable once Port 2d54986a03675dbad940948177037ce2f12d11b9 to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/reducers/compose.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/reducers/compose.js b/app/javascript/flavours/glitch/reducers/compose.js index 18e437bbc..1edc70add 100644 --- a/app/javascript/flavours/glitch/reducers/compose.js +++ b/app/javascript/flavours/glitch/reducers/compose.js @@ -547,7 +547,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); + return fromJS(action.media).set('unattached', true); } return item;