diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-12-05 17:13:05 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-12-05 17:13:44 +0100 |
commit | 64d109dc0e39574d4ed45f2443ee132dfb761033 (patch) | |
tree | a4cc21a6137701c0853d08c8283e2dca38d63787 /app/assets/javascripts | |
parent | a910cdd54d3e3fa04b00c4cdf9398e1595dce5a0 (diff) |
Downsize originals in media attachments, small fixes
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/components/actions/compose.jsx | 2 | ||||
-rw-r--r-- | app/assets/javascripts/components/components/media_gallery.jsx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/components/actions/compose.jsx b/app/assets/javascripts/components/actions/compose.jsx index 23bcf8eac..ec5465381 100644 --- a/app/assets/javascripts/components/actions/compose.jsx +++ b/app/assets/javascripts/components/actions/compose.jsx @@ -74,7 +74,7 @@ export function submitCompose() { // To make the app more responsive, immediately get the status into the columns dispatch(updateTimeline('home', { ...response.data })); - if (response.data.in_reply_to_id === null) { + if (response.data.in_reply_to_id === null && !getState().getIn(['compose', 'unlisted'])) { dispatch(updateTimeline('public', { ...response.data })); } }).catch(function (error) { diff --git a/app/assets/javascripts/components/components/media_gallery.jsx b/app/assets/javascripts/components/components/media_gallery.jsx index d04c7c869..9aafd8181 100644 --- a/app/assets/javascripts/components/components/media_gallery.jsx +++ b/app/assets/javascripts/components/components/media_gallery.jsx @@ -129,7 +129,7 @@ const MediaGallery = React.createClass({ return ( <div key={attachment.get('id')} style={{ boxSizing: 'border-box', position: 'relative', left: left, top: top, right: right, bottom: bottom, float: 'left', border: 'none', display: 'block', width: `${width}%`, height: `${height}%` }}> - <a href={attachment.get('url')} onClick={this.handleClick.bind(this, attachment.get('url'))} target='_blank' style={{ display: 'block', width: '100%', height: '100%', background: `url(${attachment.get('preview_url')}) no-repeat center`, textDecoration: 'none', backgroundSize: 'cover', cursor: 'zoom-in' }} /> + <a href={attachment.get('remote_url') ? attachment.get('remote_url') : attachment.get('url')} onClick={this.handleClick.bind(this, attachment.get('url'))} target='_blank' style={{ display: 'block', width: '100%', height: '100%', background: `url(${attachment.get('preview_url')}) no-repeat center`, textDecoration: 'none', backgroundSize: 'cover', cursor: 'zoom-in' }} /> </div> ); }); |