From e0c77dcd95f62d4da1a4c0e49bde319528641716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Wed, 24 Mar 2021 15:52:46 +0100 Subject: [PATCH] feat(tile-view) allow to toggle tile view while alone --- react/features/video-layout/components/TileViewButton.js | 4 +--- react/features/video-layout/functions.js | 7 ------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/react/features/video-layout/components/TileViewButton.js b/react/features/video-layout/components/TileViewButton.js index f7cbcb4c5..0ec2feb4a 100644 --- a/react/features/video-layout/components/TileViewButton.js +++ b/react/features/video-layout/components/TileViewButton.js @@ -9,7 +9,6 @@ import { import { TILE_VIEW_ENABLED, getFeatureFlag } from '../../base/flags'; import { translate } from '../../base/i18n'; import { IconTileView } from '../../base/icons'; -import { getParticipantCount } from '../../base/participants'; import { connect } from '../../base/redux'; import { AbstractButton, type AbstractButtonProps } from '../../base/toolbox/components'; import { setTileView } from '../actions'; @@ -87,8 +86,7 @@ class TileViewButton extends AbstractButton { */ function _mapStateToProps(state, ownProps) { const enabled = getFeatureFlag(state, TILE_VIEW_ENABLED, true); - const lonelyMeeting = getParticipantCount(state) < 2; - const { visible = enabled && !lonelyMeeting } = ownProps; + const { visible = enabled } = ownProps; return { _tileViewEnabled: shouldDisplayTileView(state), diff --git a/react/features/video-layout/functions.js b/react/features/video-layout/functions.js index ea8c6bf9d..44f6b0d1d 100644 --- a/react/features/video-layout/functions.js +++ b/react/features/video-layout/functions.js @@ -107,13 +107,6 @@ export function getTileViewGridDimensions(state: Object) { export function shouldDisplayTileView(state: Object = {}) { const participantCount = getParticipantCount(state); - // In case of a lonely meeting, we don't allow tile view. - // But it's a special case too, as we don't even render the button, - // see TileViewButton component. - if (participantCount < 2) { - return false; - } - const tileViewEnabledFeatureFlag = getFeatureFlag(state, TILE_VIEW_ENABLED, true); const { disableTileView } = state['features/base/config'];