diff options
author | Gô Shoemake <marrus-sh@users.noreply.github.com> | 2018-03-12 13:09:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-12 13:09:42 -0700 |
commit | 22f2750578c64af4e886b0cc704aa0be4ee209b0 (patch) | |
tree | e78dcbda318956c4d642a3bd16f23b3862cb6113 /app/javascript/flavours/glitch/reducers/compose.js | |
parent | 2395a4c31323e5c1433fbf232cd6c52e516a72f5 (diff) | |
parent | 841ef606a9b1bc3390830643606b3ec9d65d5120 (diff) |
Merge pull request #384 from ThibG/glitch-soc/features/no-media-url
Remove text requirement when media attached from statuses (fixes #381)
Diffstat (limited to 'app/javascript/flavours/glitch/reducers/compose.js')
-rw-r--r-- | app/javascript/flavours/glitch/reducers/compose.js | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/reducers/compose.js b/app/javascript/flavours/glitch/reducers/compose.js index 722670cf1..8973c7713 100644 --- a/app/javascript/flavours/glitch/reducers/compose.js +++ b/app/javascript/flavours/glitch/reducers/compose.js @@ -158,7 +158,6 @@ function appendMedia(state, media) { map.update('media_attachments', list => list.push(media)); map.set('is_uploading', false); map.set('resetFileKey', Math.floor((Math.random() * 0x10000))); - map.update('text', oldText => `${oldText.trim()} ${media.get('text_url')}`); map.set('focusDate', new Date()); map.set('idempotencyKey', uuid()); @@ -169,12 +168,10 @@ function appendMedia(state, media) { }; function removeMedia(state, mediaId) { - const media = state.get('media_attachments').find(item => item.get('id') === mediaId); const prevSize = state.get('media_attachments').size; return state.withMutations(map => { map.update('media_attachments', list => list.filterNot(item => item.get('id') === mediaId)); - map.update('text', text => text.replace(media.get('text_url'), '').trim()); map.set('idempotencyKey', uuid()); if (prevSize === 1) { |