Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Fix scroll jumping when a video is decrypted #594

Merged
merged 1 commit into from
Dec 20, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/components/views/messages/MVideoBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ import q from 'q';
module.exports = React.createClass({
displayName: 'MVideoBody',

propTypes: {
/* the MatrixEvent to show */
mxEvent: React.PropTypes.object.isRequired,

/* called when the video has loaded */
onWidgetLoad: React.PropTypes.func.isRequired,
},

getInitialState: function() {
return {
decryptedUrl: null,
Expand Down Expand Up @@ -100,6 +108,7 @@ module.exports = React.createClass({
decryptedThumbnailUrl: thumbnailUrl,
decryptedBlob: decryptedBlob,
});
this.props.onWidgetLoad();
});
}).catch((err) => {
console.warn("Unable to decrypt attachment: ", err)
Expand Down