|
|
@@ -22,7 +22,6 @@ StateListenerRegistry.register(
|
|
22
|
22
|
if (!equals(gridDimensions, oldGridDimensions)) {
|
|
23
|
23
|
const { clientHeight, clientWidth } = state['features/base/responsive-ui'];
|
|
24
|
24
|
const { isOpen } = state['features/chat'];
|
|
25
|
|
- const { visible } = state['features/toolbox'];
|
|
26
|
25
|
|
|
27
|
26
|
store.dispatch(
|
|
28
|
27
|
setTileViewDimensions(
|
|
|
@@ -31,8 +30,7 @@ StateListenerRegistry.register(
|
|
31
|
30
|
clientHeight,
|
|
32
|
31
|
clientWidth
|
|
33
|
32
|
},
|
|
34
|
|
- isOpen,
|
|
35
|
|
- visible
|
|
|
33
|
+ isOpen
|
|
36
|
34
|
)
|
|
37
|
35
|
);
|
|
38
|
36
|
}
|
|
|
@@ -51,7 +49,6 @@ StateListenerRegistry.register(
|
|
51
|
49
|
case LAYOUTS.TILE_VIEW: {
|
|
52
|
50
|
const { clientHeight, clientWidth } = state['features/base/responsive-ui'];
|
|
53
|
51
|
const { isOpen } = state['features/chat'];
|
|
54
|
|
- const { visible } = state['features/toolbox'];
|
|
55
|
52
|
|
|
56
|
53
|
store.dispatch(
|
|
57
|
54
|
setTileViewDimensions(
|
|
|
@@ -60,8 +57,7 @@ StateListenerRegistry.register(
|
|
60
|
57
|
clientHeight,
|
|
61
|
58
|
clientWidth
|
|
62
|
59
|
},
|
|
63
|
|
- isOpen,
|
|
64
|
|
- visible
|
|
|
60
|
+ isOpen
|
|
65
|
61
|
)
|
|
66
|
62
|
);
|
|
67
|
63
|
break;
|
|
|
@@ -114,7 +110,6 @@ StateListenerRegistry.register(
|
|
114
|
110
|
if (shouldDisplayTileView(state)) {
|
|
115
|
111
|
const gridDimensions = getTileViewGridDimensions(state);
|
|
116
|
112
|
const { clientHeight, clientWidth } = state['features/base/responsive-ui'];
|
|
117
|
|
- const { visible } = state['features/toolbox'];
|
|
118
|
113
|
|
|
119
|
114
|
store.dispatch(
|
|
120
|
115
|
setTileViewDimensions(
|
|
|
@@ -123,35 +118,7 @@ StateListenerRegistry.register(
|
|
123
|
118
|
clientHeight,
|
|
124
|
119
|
clientWidth
|
|
125
|
120
|
},
|
|
126
|
|
- isChatOpen,
|
|
127
|
|
- visible
|
|
128
|
|
- )
|
|
129
|
|
- );
|
|
130
|
|
- }
|
|
131
|
|
- });
|
|
132
|
|
-
|
|
133
|
|
-/**
|
|
134
|
|
- * Listens for changes in the chat state to calculate the dimensions of the tile view grid and the tiles.
|
|
135
|
|
- */
|
|
136
|
|
-StateListenerRegistry.register(
|
|
137
|
|
- /* selector */ state => state['features/toolbox'].visible,
|
|
138
|
|
- /* listener */ (visible, store) => {
|
|
139
|
|
- const state = store.getState();
|
|
140
|
|
-
|
|
141
|
|
- if (shouldDisplayTileView(state)) {
|
|
142
|
|
- const gridDimensions = getTileViewGridDimensions(state);
|
|
143
|
|
- const { clientHeight, clientWidth } = state['features/base/responsive-ui'];
|
|
144
|
|
- const { isOpen } = state['features/chat'];
|
|
145
|
|
-
|
|
146
|
|
- store.dispatch(
|
|
147
|
|
- setTileViewDimensions(
|
|
148
|
|
- gridDimensions,
|
|
149
|
|
- {
|
|
150
|
|
- clientHeight,
|
|
151
|
|
- clientWidth
|
|
152
|
|
- },
|
|
153
|
|
- isOpen,
|
|
154
|
|
- visible
|
|
|
121
|
+ isChatOpen
|
|
155
|
122
|
)
|
|
156
|
123
|
);
|
|
157
|
124
|
}
|