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

Commit 39fe72e

Browse files
authored
Fix broadcast pip seekbar (#10072)
1 parent 5ba8eca commit 39fe72e

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/components/structures/PipContainer.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -258,17 +258,16 @@ class PipContainerInner extends React.Component<IProps, IState> {
258258
}
259259

260260
private createVoiceBroadcastPlaybackPipContent(voiceBroadcastPlayback: VoiceBroadcastPlayback): CreatePipChildren {
261-
if (this.state.viewedRoomId === voiceBroadcastPlayback.infoEvent.getRoomId()) {
262-
return ({ onStartMoving }) => (
263-
<div onMouseDown={onStartMoving}>
264-
<VoiceBroadcastPlaybackBody playback={voiceBroadcastPlayback} pip={true} />
265-
</div>
261+
const content =
262+
this.state.viewedRoomId === voiceBroadcastPlayback.infoEvent.getRoomId() ? (
263+
<VoiceBroadcastPlaybackBody playback={voiceBroadcastPlayback} pip={true} />
264+
) : (
265+
<VoiceBroadcastSmallPlaybackBody playback={voiceBroadcastPlayback} />
266266
);
267-
}
268267

269268
return ({ onStartMoving }) => (
270-
<div onMouseDown={onStartMoving}>
271-
<VoiceBroadcastSmallPlaybackBody playback={voiceBroadcastPlayback} />
269+
<div key={voiceBroadcastPlayback.infoEvent.getId()} onMouseDown={onStartMoving}>
270+
{content}
272271
</div>
273272
);
274273
}

0 commit comments

Comments
 (0)