diff options
author | Starfall <us@starfall.systems> | 2022-11-12 10:09:41 -0600 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2022-11-12 10:11:39 -0600 |
commit | b07b6b9f339b604f9af150eb10ac1486eca8f189 (patch) | |
tree | 512943f7488b1fdb7d7c5d87cc039ea2f1886292 /app/javascript/flavours/glitch/reducers | |
parent | b96b336a7871b5e88da8f308116e8f0ca7827132 (diff) | |
parent | 81b1d32d5b618daa4003b8de8292ae4dd3e656f6 (diff) |
Merge remote-tracking branch 'glitch/main'
Diffstat (limited to 'app/javascript/flavours/glitch/reducers')
-rw-r--r-- | app/javascript/flavours/glitch/reducers/compose.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/reducers/compose.js b/app/javascript/flavours/glitch/reducers/compose.js index 460af3955..18e437bbc 100644 --- a/app/javascript/flavours/glitch/reducers/compose.js +++ b/app/javascript/flavours/glitch/reducers/compose.js @@ -222,7 +222,7 @@ function appendMedia(state, media, file) { if (media.get('type') === 'image') { media = media.set('file', file); } - map.update('media_attachments', list => list.push(media)); + map.update('media_attachments', list => list.push(media.set('unattached', true))); map.set('is_uploading', false); map.set('is_processing', false); map.set('resetFileKey', Math.floor((Math.random() * 0x10000))); @@ -563,7 +563,7 @@ export default function compose(state = initialState, action) { map.set('content_type', action.content_type || 'text/plain'); map.set('in_reply_to', action.status.get('in_reply_to_id')); map.set('privacy', action.status.get('visibility')); - map.set('media_attachments', action.status.get('media_attachments')); + map.set('media_attachments', action.status.get('media_attachments').map((media) => media.set('unattached', true))); map.set('focusDate', new Date()); map.set('caretPosition', null); map.set('idempotencyKey', uuid()); |