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({
32
32
propTypes : {
33
33
/* the MatrixEvent to show */
34
34
mxEvent : React . PropTypes . object . isRequired ,
35
+
36
+ /* called when the image has loaded */
37
+ onWidgetLoad : React . PropTypes . func . isRequired ,
35
38
} ,
36
39
37
40
getInitialState : function ( ) {
@@ -123,6 +126,7 @@ module.exports = React.createClass({
123
126
decryptedUrl : contentUrl ,
124
127
decryptedThumbnailUrl : thumbnailUrl ,
125
128
} ) ;
129
+ this . props . onWidgetLoad ( ) ;
126
130
} ) ;
127
131
} ) . catch ( ( err ) => {
128
132
console . warn ( "Unable to decrypt attachment: " , err ) ;
@@ -186,11 +190,12 @@ module.exports = React.createClass({
186
190
< span className = "mx_MImageBody" ref = "body" >
187
191
< div className = "mx_MImageBody_thumbnail" ref = "image" style = { {
188
192
"display" : "flex" ,
189
- "align-items" : "center" ,
190
- "justify-items" : "center" ,
193
+ "alignItems" : "center" ,
191
194
"width" : "100%" ,
192
195
} } >
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
+ } } />
194
199
</ div >
195
200
</ span >
196
201
) ;
You can’t perform that action at this time.
0 commit comments