|
|
@@ -5,7 +5,7 @@ import VideoLayout from '../../../modules/UI/videolayout/VideoLayout';
|
|
5
|
5
|
import { StateListenerRegistry, equals } from '../base/redux';
|
|
6
|
6
|
import { getCurrentLayout, getTileViewGridDimensions, shouldDisplayTileView, LAYOUTS } from '../video-layout';
|
|
7
|
7
|
|
|
8
|
|
-import { setHorizontalViewDimensions, setTileViewDimensions } from './actions';
|
|
|
8
|
+import { setHorizontalViewDimensions, setTileViewDimensions } from './actions.web';
|
|
9
|
9
|
|
|
10
|
10
|
/**
|
|
11
|
11
|
* Listens for changes in the number of participants to calculate the dimensions of the tile view grid and the tiles.
|
|
|
@@ -19,12 +19,19 @@ StateListenerRegistry.register(
|
|
19
|
19
|
const gridDimensions = getTileViewGridDimensions(state);
|
|
20
|
20
|
const oldGridDimensions = state['features/filmstrip'].tileViewDimensions.gridDimensions;
|
|
21
|
21
|
const { clientHeight, clientWidth } = state['features/base/responsive-ui'];
|
|
|
22
|
+ const { isOpen } = state['features/chat'];
|
|
22
|
23
|
|
|
23
|
24
|
if (!equals(gridDimensions, oldGridDimensions)) {
|
|
24
|
|
- store.dispatch(setTileViewDimensions(gridDimensions, {
|
|
25
|
|
- clientHeight,
|
|
26
|
|
- clientWidth
|
|
27
|
|
- }));
|
|
|
25
|
+ store.dispatch(
|
|
|
26
|
+ setTileViewDimensions(
|
|
|
27
|
+ gridDimensions,
|
|
|
28
|
+ {
|
|
|
29
|
+ clientHeight,
|
|
|
30
|
+ clientWidth
|
|
|
31
|
+ },
|
|
|
32
|
+ isOpen
|
|
|
33
|
+ )
|
|
|
34
|
+ );
|
|
28
|
35
|
}
|
|
29
|
36
|
}
|
|
30
|
37
|
});
|
|
|
@@ -40,12 +47,18 @@ StateListenerRegistry.register(
|
|
40
|
47
|
switch (layout) {
|
|
41
|
48
|
case LAYOUTS.TILE_VIEW: {
|
|
42
|
49
|
const { clientHeight, clientWidth } = state['features/base/responsive-ui'];
|
|
|
50
|
+ const { isOpen } = state['features/chat'];
|
|
43
|
51
|
|
|
44
|
|
- store.dispatch(setTileViewDimensions(
|
|
45
|
|
- getTileViewGridDimensions(state), {
|
|
46
|
|
- clientHeight,
|
|
47
|
|
- clientWidth
|
|
48
|
|
- }));
|
|
|
52
|
+ store.dispatch(
|
|
|
53
|
+ setTileViewDimensions(
|
|
|
54
|
+ getTileViewGridDimensions(state),
|
|
|
55
|
+ {
|
|
|
56
|
+ clientHeight,
|
|
|
57
|
+ clientWidth
|
|
|
58
|
+ },
|
|
|
59
|
+ isOpen
|
|
|
60
|
+ )
|
|
|
61
|
+ );
|
|
49
|
62
|
break;
|
|
50
|
63
|
}
|
|
51
|
64
|
case LAYOUTS.HORIZONTAL_FILMSTRIP_VIEW:
|
|
|
@@ -76,3 +89,36 @@ StateListenerRegistry.register(
|
|
76
|
89
|
}
|
|
77
|
90
|
}
|
|
78
|
91
|
);
|
|
|
92
|
+
|
|
|
93
|
+/**
|
|
|
94
|
+ * Listens for changes in the chat state to calculate the dimensions of the tile view grid and the tiles.
|
|
|
95
|
+ */
|
|
|
96
|
+StateListenerRegistry.register(
|
|
|
97
|
+ /* selector */ state => state['features/chat'].isOpen,
|
|
|
98
|
+ /* listener */ (isChatOpen, store) => {
|
|
|
99
|
+ const state = store.getState();
|
|
|
100
|
+
|
|
|
101
|
+ if (isChatOpen) {
|
|
|
102
|
+ // $FlowFixMe
|
|
|
103
|
+ document.body.classList.add('shift-right');
|
|
|
104
|
+ } else {
|
|
|
105
|
+ // $FlowFixMe
|
|
|
106
|
+ document.body.classList.remove('shift-right');
|
|
|
107
|
+ }
|
|
|
108
|
+
|
|
|
109
|
+ if (shouldDisplayTileView(state)) {
|
|
|
110
|
+ const gridDimensions = getTileViewGridDimensions(state);
|
|
|
111
|
+ const { clientHeight, clientWidth } = state['features/base/responsive-ui'];
|
|
|
112
|
+
|
|
|
113
|
+ store.dispatch(
|
|
|
114
|
+ setTileViewDimensions(
|
|
|
115
|
+ gridDimensions,
|
|
|
116
|
+ {
|
|
|
117
|
+ clientHeight,
|
|
|
118
|
+ clientWidth
|
|
|
119
|
+ },
|
|
|
120
|
+ isChatOpen
|
|
|
121
|
+ )
|
|
|
122
|
+ );
|
|
|
123
|
+ }
|
|
|
124
|
+ });
|