This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
src/components/views/messages Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,9 @@ module.exports = React.createClass({
3232 propTypes : {
3333 /* the MatrixEvent to show */
3434 mxEvent : React . PropTypes . object . isRequired ,
35+
36+ /* called when the image has loaded */
37+ onWidgetLoad : React . PropTypes . func . isRequired ,
3538 } ,
3639
3740 getInitialState : function ( ) {
@@ -123,6 +126,7 @@ module.exports = React.createClass({
123126 decryptedUrl : contentUrl ,
124127 decryptedThumbnailUrl : thumbnailUrl ,
125128 } ) ;
129+ this . props . onWidgetLoad ( ) ;
126130 } ) ;
127131 } ) . catch ( ( err ) => {
128132 console . warn ( "Unable to decrypt attachment: " , err ) ;
@@ -186,11 +190,12 @@ module.exports = React.createClass({
186190 < span className = "mx_MImageBody" ref = "body" >
187191 < div className = "mx_MImageBody_thumbnail" ref = "image" style = { {
188192 "display" : "flex" ,
189- "align-items" : "center" ,
190- "justify-items" : "center" ,
193+ "alignItems" : "center" ,
191194 "width" : "100%" ,
192195 } } >
193- < img src = "img/spinner.gif" alt = { content . body } width = "16" height = "16" />
196+ < img src = "img/spinner.gif" alt = { content . body } width = "32" height = "32" style = { {
197+ "margin" : "auto" ,
198+ } } />
194199 </ div >
195200 </ span >
196201 ) ;
You can’t perform that action at this time.
0 commit comments