diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-03-07 08:28:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-07 08:28:52 +0100 |
commit | cfa9b6e13ab3c434f3901df6f614d0aa94a3d1ed (patch) | |
tree | e303778680cdd80ad5a31ec5fb3b28ba5dc834ef /app/javascript/mastodon/reducers/compose.js | |
parent | e26d5ca923353c9cd61073c444c0841bae4b9664 (diff) |
Remove text requirement when media attached from statuses (#6672)
Diffstat (limited to 'app/javascript/mastodon/reducers/compose.js')
-rw-r--r-- | app/javascript/mastodon/reducers/compose.js | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/app/javascript/mastodon/reducers/compose.js b/app/javascript/mastodon/reducers/compose.js index dc88390df..532f4b2a7 100644 --- a/app/javascript/mastodon/reducers/compose.js +++ b/app/javascript/mastodon/reducers/compose.js @@ -90,7 +90,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()); @@ -101,12 +100,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) { |