Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(video-layout) fix usage of disableTileView

Saúl Ibarra Corretgéf0ff6a9f1cf5
diff --git a/react/features/video-layout/functions.any.js b/react/features/video-layout/functions.any.js
index 4a198cba29..f9d53791b1 100644
--- a/react/features/video-layout/functions.any.js
+++ b/react/features/video-layout/functions.any.js
@@ -60,15 +60,6 @@ export function getCurrentLayout(state: Object) {
* @returns {boolean} True if tile view should be displayed.
*/
export function shouldDisplayTileView(state: Object = {}) {
- const participantCount = getParticipantCount(state);
-
- const tileViewEnabledFeatureFlag = getFeatureFlag(state, TILE_VIEW_ENABLED, true);
- const { disableTileView } = state['features/base/config'];
-
- if (disableTileView || !tileViewEnabledFeatureFlag) {
- return false;
- }
-
const { tileViewEnabled } = state['features/video-layout'];
if (tileViewEnabled !== undefined) {
@@ -77,6 +68,14 @@ export function shouldDisplayTileView(state: Object = {}) {
return tileViewEnabled;
}
+ const tileViewEnabledFeatureFlag = getFeatureFlag(state, TILE_VIEW_ENABLED, true);
+ const { disableTileView } = state['features/base/config'];
+
+ if (disableTileView || !tileViewEnabledFeatureFlag) {
+ return false;
+ }
+
+ const participantCount = getParticipantCount(state);
const { iAmRecorder } = state['features/base/config'];
// None tile view mode is easier to calculate (no need for many negations), so we do