Skip to content

Commit

Permalink
fix expand/collapse arrows for youtube videos (mattermost#7240)
Browse files Browse the repository at this point in the history
  • Loading branch information
saturninoabril authored and jwilander committed Aug 21, 2017
1 parent 7d8c4a8 commit 32acc39
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default class PostAttachmentOpenGraph extends React.PureComponent {
}

componentDidUpdate() {
postListScrollChange();
setTimeout(postListScrollChange, 0);
}

fetchData(url) {
Expand Down
1 change: 1 addition & 0 deletions components/post_view/post_body_additional_content.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export default class PostBodyAdditionalContent extends React.PureComponent {
channelId={this.props.post.channel_id}
link={link}
show={this.state.embedVisible}
onLinkLoaded={this.handleLinkLoaded}
/>
);
}
Expand Down
4 changes: 3 additions & 1 deletion components/youtube_video/youtube_video.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export default class YoutubeVideo extends React.PureComponent {
channelId: PropTypes.string.isRequired,
currentChannelId: PropTypes.string.isRequired,
link: PropTypes.string.isRequired,
show: PropTypes.bool.isRequired
show: PropTypes.bool.isRequired,
onLinkLoaded: PropTypes.func
}

constructor(props) {
Expand Down Expand Up @@ -103,6 +104,7 @@ export default class YoutubeVideo extends React.PureComponent {
} else {
this.loadWithoutKey();
}
this.props.onLinkLoaded();
}

loadWithoutKey() {
Expand Down

0 comments on commit 32acc39

Please sign in to comment.