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

Fix broadcast pip seekbar #10072

Merged
merged 2 commits into from
Feb 6, 2023
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
15 changes: 7 additions & 8 deletions src/components/structures/PipContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,17 +258,16 @@ class PipContainerInner extends React.Component<IProps, IState> {
}

private createVoiceBroadcastPlaybackPipContent(voiceBroadcastPlayback: VoiceBroadcastPlayback): CreatePipChildren {
if (this.state.viewedRoomId === voiceBroadcastPlayback.infoEvent.getRoomId()) {
return ({ onStartMoving }) => (
<div onMouseDown={onStartMoving}>
<VoiceBroadcastPlaybackBody playback={voiceBroadcastPlayback} pip={true} />
</div>
const content =
this.state.viewedRoomId === voiceBroadcastPlayback.infoEvent.getRoomId() ? (
<VoiceBroadcastPlaybackBody playback={voiceBroadcastPlayback} pip={true} />
) : (
<VoiceBroadcastSmallPlaybackBody playback={voiceBroadcastPlayback} />
);
}

return ({ onStartMoving }) => (
<div onMouseDown={onStartMoving}>
<VoiceBroadcastSmallPlaybackBody playback={voiceBroadcastPlayback} />
<div key={voiceBroadcastPlayback.infoEvent.getId()} onMouseDown={onStartMoving}>
{content}
</div>
);
}
Expand Down