@@ -17,6 +17,7 @@ import CharacterCounter from 'mastodon/features/compose/components/character_cou
1717import { length } from 'stringz' ;
1818import { Tesseract as fetchTesseract } from 'mastodon/features/ui/util/async-components' ;
1919import GIFV from 'mastodon/components/gifv' ;
20+ import { me } from 'mastodon/initial_state' ;
2021
2122const messages = defineMessages ( {
2223 close : { id : 'lightbox.close' , defaultMessage : 'Close' } ,
@@ -26,6 +27,7 @@ const messages = defineMessages({
2627
2728const mapStateToProps = ( state , { id } ) => ( {
2829 media : state . getIn ( [ 'compose' , 'media_attachments' ] ) . find ( item => item . get ( 'id' ) === id ) ,
30+ account : state . getIn ( [ 'accounts' , me ] ) ,
2931} ) ;
3032
3133const mapDispatchToProps = ( dispatch , { id } ) => ( {
@@ -78,6 +80,7 @@ class FocalPointModal extends ImmutablePureComponent {
7880
7981 static propTypes = {
8082 media : ImmutablePropTypes . map . isRequired ,
83+ account : ImmutablePropTypes . map . isRequired ,
8184 onClose : PropTypes . func . isRequired ,
8285 intl : PropTypes . object . isRequired ,
8386 } ;
@@ -233,7 +236,7 @@ class FocalPointModal extends ImmutablePureComponent {
233236 }
234237
235238 render ( ) {
236- const { media, intl, onClose } = this . props ;
239+ const { media, intl, account , onClose } = this . props ;
237240 const { x, y, dragging, description, dirty, detecting, progress } = this . state ;
238241
239242 const width = media . getIn ( [ 'meta' , 'original' , 'width' ] ) || null ;
@@ -325,7 +328,8 @@ class FocalPointModal extends ImmutablePureComponent {
325328 src = { media . get ( 'url' ) }
326329 duration = { media . getIn ( [ 'meta' , 'original' , 'duration' ] , 0 ) }
327330 height = { 150 }
328- preload
331+ poster = { media . get ( 'preview_url' ) || account . get ( 'avatar_static' ) }
332+ blurhash = { media . get ( 'blurhash' ) }
329333 editable
330334 />
331335 ) }
0 commit comments