Fix PictureInPicture to work in quotes
This commit is contained in:
parent
9be377319f
commit
e9ee34d3f4
1 changed files with 10 additions and 6 deletions
|
@ -381,10 +381,10 @@ class Status extends ImmutablePureComponent {
|
|||
status = status.get('reblog');
|
||||
}
|
||||
|
||||
if (pictureInPicture.get('inUse')) {
|
||||
media = <PictureInPicturePlaceholder width={this.props.cachedMediaWidth} />;
|
||||
} else if (status.get('media_attachments').size > 0) {
|
||||
if (this.props.muted) {
|
||||
if (status.get('media_attachments').size > 0) {
|
||||
if (pictureInPicture.get('inUse')) {
|
||||
media = <PictureInPicturePlaceholder width={this.props.cachedMediaWidth} />;
|
||||
} else if (this.props.muted) {
|
||||
media = (
|
||||
<AttachmentList
|
||||
compact
|
||||
|
@ -492,7 +492,9 @@ class Status extends ImmutablePureComponent {
|
|||
|
||||
let quote_media = null;
|
||||
if (quote_status.get('media_attachments').size > 0) {
|
||||
if (this.props.muted) {
|
||||
if (pictureInPicture.get('inUse')) {
|
||||
quote_media = <PictureInPicturePlaceholder width={this.props.cachedMediaWidth} />;
|
||||
} else if (this.props.muted) {
|
||||
quote_media = (
|
||||
<AttachmentList
|
||||
compact
|
||||
|
@ -516,7 +518,8 @@ class Status extends ImmutablePureComponent {
|
|||
width={this.props.cachedMediaWidth}
|
||||
height={70}
|
||||
cacheWidth={this.props.cacheMediaWidth}
|
||||
/>
|
||||
deployPictureInPicture={pictureInPicture.get('available') ? this.handleDeployPictureInPicture : undefined}
|
||||
/>
|
||||
)}
|
||||
</Bundle>
|
||||
);
|
||||
|
@ -537,6 +540,7 @@ class Status extends ImmutablePureComponent {
|
|||
sensitive={quote_status.get('sensitive')}
|
||||
onOpenVideo={this.handleOpenVideo}
|
||||
cacheWidth={this.props.cacheMediaWidth}
|
||||
deployPictureInPicture={pictureInPicture.get('available') ? this.handleDeployPictureInPicture : undefined}
|
||||
visible={this.state.showQuoteMedia}
|
||||
onToggleVisibility={this.handleToggleQuoteMediaVisibility}
|
||||
quote
|
||||
|
|
Loading…
Reference in a new issue