Skip to content

Commit 519310a

Browse files
committed
fix(custom-panel): refresh videoSpaceWidth when the panel toggles open/closed
Without this subscriber, opening or closing the custom panel does not refresh `videoSpaceWidth` in redux, so tile-view dimensions stay sized for the previous layout until something else (window resize, chat toggle, panel drag) triggers a recalculation. Mirrors the equivalent subscribers for chat and the participants pane in `react/features/filmstrip/subscriber.web.ts`.
1 parent 2ff82be commit 519310a

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

react/features/custom-panel/subscriber.web.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ import { setCustomPanelWidth } from './actions.web';
77
import { DEFAULT_CUSTOM_PANEL_WIDTH } from './constants';
88
import { getCustomPanelMaxSize } from './functions';
99

10+
/**
11+
* Listens for changes in the custom panel open state to recompute available
12+
* video space width. Without this, opening or closing the panel does not
13+
* refresh `videoSpaceWidth`, so tile dimensions stay sized for the previous
14+
* layout until something else triggers a recalculation. Mirrors the pattern
15+
* used by chat and the participants pane.
16+
*/
17+
StateListenerRegistry.register(
18+
/* selector */ state => state['features/custom-panel'].isOpen,
19+
/* listener */ (_isOpen, store) => {
20+
const { innerWidth, innerHeight } = window;
21+
22+
store.dispatch(clientResized(innerWidth, innerHeight));
23+
});
24+
1025
interface IListenerState {
1126
clientWidth: number;
1227
isOpen: boolean;

0 commit comments

Comments
 (0)