diff --git a/src/app/pages/call/PersistentCallContainer.tsx b/src/app/pages/call/PersistentCallContainer.tsx
index c958cb12..cf391a0a 100644
--- a/src/app/pages/call/PersistentCallContainer.tsx
+++ b/src/app/pages/call/PersistentCallContainer.tsx
@@ -20,6 +20,7 @@ import { useSelectedRoom } from '../../hooks/router/useSelectedRoom';
import { useClientConfig } from '../../hooks/useClientConfig';
import { RoomView } from '../../features/room/RoomView';
import { useParams } from 'react-router-dom';
+import { PowerLevelsContainer } from './PowerLevelsContainer';
interface PersistentCallContainerProps {
isVisible: boolean;
@@ -31,8 +32,12 @@ export function PersistentCallContainer({ isVisible }: PersistentCallContainerPr
const mx = useMatrixClient();
const roomId = useSelectedRoom();
const clientConfig = useClientConfig();
+ // Make a new TSX element for usePowerLevels that falls in line with how they are using it for RoomView
+ // That way we avoid this lobby issue. We should still be able to plant that new element
+ // In the same blocks we have?
+ // If not we need to find some dummy ID to place as the default behavior.
+ // But the ideal is to avoid this check unless it CAN be applicable
const room = mx.getRoom(roomId);
- const powerLevels = usePowerLevels(room ?? null);
logger.info(room);
@@ -153,8 +158,7 @@ export function PersistentCallContainer({ isVisible }: PersistentCallContainerPr
overflowY: 'auto',
}}
>
-
-
+
@@ -162,8 +166,7 @@ export function PersistentCallContainer({ isVisible }: PersistentCallContainerPr
}
/>
-
-
+
)}
@@ -173,13 +176,9 @@ export function PersistentCallContainer({ isVisible }: PersistentCallContainerPr
>
{activeCallRoomId && roomId && (
-
-
-
+
-
-
-
+
)}
@@ -202,13 +201,9 @@ export function PersistentCallContainer({ isVisible }: PersistentCallContainerPr
{activeCallRoomId && roomId !== null && (
-
-
-
+
-
-
-
+
)}
diff --git a/src/app/pages/call/PowerLevelsContainer.tsx b/src/app/pages/call/PowerLevelsContainer.tsx
new file mode 100644
index 00000000..b7216e60
--- /dev/null
+++ b/src/app/pages/call/PowerLevelsContainer.tsx
@@ -0,0 +1,29 @@
+import React, { ReactNode } from "react";
+import { useSelectedRoom } from "../../hooks/router/useSelectedRoom";
+import { useMatrixClient } from "../../hooks/useMatrixClient";
+import { PowerLevelsContextProvider, usePowerLevels } from "../../hooks/usePowerLevels";
+import { RouteSpaceProvider, SpaceRouteRoomProvider } from "../client/space";
+
+
+
+type PowerLevelsContainerProps = {
+ children: ReactNode;
+};
+export function PowerLevelsContainer({ children }: PowerLevelsContainerProps) {
+
+ const mx = useMatrixClient();
+ const roomId = useSelectedRoom();
+ const room = mx.getRoom(roomId);
+ const powerLevels = usePowerLevels(room ?? null);
+
+
+ return (
+
+
+
+ { children }
+
+
+
+ );
+}
\ No newline at end of file