Skip to content

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

feat(tile-view) allow to toggle tile view while alone

Saúl Ibarra Corretgée0c77dcd95f6
diff --git a/react/features/video-layout/components/TileViewButton.js b/react/features/video-layout/components/TileViewButton.js
index f7cbcb4c56..0ec2feb4af 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<P: Props> extends AbstractButton<P, *> {
*/
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 ea8c6bf9d4..44f6b0d1de 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'];