@@ -21,21 +21,21 @@ import classNames from "classnames";
2121import { Room } from "matrix-js-sdk/src/models/room" ;
2222import { Optional } from "matrix-events-sdk" ;
2323
24- import LegacyCallView from "./LegacyCallView" ;
25- import LegacyCallHandler , { LegacyCallHandlerEvent } from "../../../ LegacyCallHandler" ;
26- import PersistentApp from "../elements/PersistentApp" ;
27- import { MatrixClientPeg } from "../../../ MatrixClientPeg" ;
24+ import LegacyCallView from "../views/voip /LegacyCallView" ;
25+ import LegacyCallHandler , { LegacyCallHandlerEvent } from "../../LegacyCallHandler" ;
26+ import PersistentApp from "../views/ elements/PersistentApp" ;
27+ import { MatrixClientPeg } from "../../MatrixClientPeg" ;
2828import PictureInPictureDragger , { CreatePipChildren } from "./PictureInPictureDragger" ;
29- import dis from "../../../ dispatcher/dispatcher" ;
30- import { Action } from "../../../ dispatcher/actions" ;
31- import { Container , WidgetLayoutStore } from "../../../ stores/widgets/WidgetLayoutStore" ;
32- import LegacyCallViewHeader from "./LegacyCallView/LegacyCallViewHeader" ;
33- import ActiveWidgetStore , { ActiveWidgetStoreEvent } from "../../../ stores/ActiveWidgetStore" ;
34- import WidgetStore , { IApp } from "../../../ stores/WidgetStore" ;
35- import { ViewRoomPayload } from "../../../ dispatcher/payloads/ViewRoomPayload" ;
36- import { UPDATE_EVENT } from "../../../ stores/AsyncStore" ;
37- import { SDKContext , SdkContextClass } from "../../../ contexts/SDKContext" ;
38- import { CallStore } from "../../../ stores/CallStore" ;
29+ import dis from "../../dispatcher/dispatcher" ;
30+ import { Action } from "../../dispatcher/actions" ;
31+ import { Container , WidgetLayoutStore } from "../../stores/widgets/WidgetLayoutStore" ;
32+ import LegacyCallViewHeader from "../views/voip /LegacyCallView/LegacyCallViewHeader" ;
33+ import ActiveWidgetStore , { ActiveWidgetStoreEvent } from "../../stores/ActiveWidgetStore" ;
34+ import WidgetStore , { IApp } from "../../stores/WidgetStore" ;
35+ import { ViewRoomPayload } from "../../dispatcher/payloads/ViewRoomPayload" ;
36+ import { UPDATE_EVENT } from "../../stores/AsyncStore" ;
37+ import { SDKContext , SdkContextClass } from "../../contexts/SDKContext" ;
38+ import { CallStore } from "../../stores/CallStore" ;
3939import {
4040 useCurrentVoiceBroadcastPreRecording ,
4141 useCurrentVoiceBroadcastRecording ,
@@ -46,8 +46,8 @@ import {
4646 VoiceBroadcastRecording ,
4747 VoiceBroadcastRecordingPip ,
4848 VoiceBroadcastSmallPlaybackBody ,
49- } from "../../../ voice-broadcast" ;
50- import { useCurrentVoiceBroadcastPlayback } from "../../../ voice-broadcast/hooks/useCurrentVoiceBroadcastPlayback" ;
49+ } from "../../voice-broadcast" ;
50+ import { useCurrentVoiceBroadcastPlayback } from "../../voice-broadcast/hooks/useCurrentVoiceBroadcastPlayback" ;
5151
5252const SHOW_CALL_IN_STATES = [
5353 CallState . Connected ,
@@ -128,12 +128,12 @@ function getPrimarySecondaryCallsForPip(roomId: Optional<string>): [MatrixCall |
128128}
129129
130130/**
131- * PipView shows a small version of the LegacyCallView or a sticky widget hovering over the UI in 'picture-in-picture'
132- * (PiP mode). It displays the call(s) which is *not* in the room the user is currently viewing
131+ * PipContainer shows a small version of the LegacyCallView or a sticky widget hovering over the UI in
132+ * 'picture-in-picture' (PiP mode). It displays the call(s) which is *not* in the room the user is currently viewing
133133 * and all widgets that are active but not shown in any other possible container.
134134 */
135135
136- class PipView extends React . Component < IProps , IState > {
136+ class PipContainerInner extends React . Component < IProps , IState > {
137137 // The cast is not so great, but solves the typing issue for the moment.
138138 // Proper solution: use useRef (requires the component to be refactored to a functional component).
139139 private movePersistedElement = createRef < ( ) => void > ( ) as React . MutableRefObject < ( ) => void > ;
@@ -452,7 +452,7 @@ class PipView extends React.Component<IProps, IState> {
452452 }
453453}
454454
455- const PipViewHOC : React . FC < IProps > = ( props ) => {
455+ export const PipContainer : React . FC < IProps > = ( props ) => {
456456 const sdkContext = useContext ( SDKContext ) ;
457457 const voiceBroadcastPreRecordingStore = sdkContext . voiceBroadcastPreRecordingStore ;
458458 const { currentVoiceBroadcastPreRecording } = useCurrentVoiceBroadcastPreRecording ( voiceBroadcastPreRecordingStore ) ;
@@ -464,13 +464,11 @@ const PipViewHOC: React.FC<IProps> = (props) => {
464464 const { currentVoiceBroadcastPlayback } = useCurrentVoiceBroadcastPlayback ( voiceBroadcastPlaybacksStore ) ;
465465
466466 return (
467- < PipView
467+ < PipContainerInner
468468 voiceBroadcastPlayback = { currentVoiceBroadcastPlayback }
469469 voiceBroadcastPreRecording = { currentVoiceBroadcastPreRecording }
470470 voiceBroadcastRecording = { currentVoiceBroadcastRecording }
471471 { ...props }
472472 />
473473 ) ;
474474} ;
475-
476- export default PipViewHOC ;
0 commit comments