瀏覽代碼

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

j8
Saúl Ibarra Corretgé 4 年之前
父節點
當前提交
e0c77dcd95
共有 2 個文件被更改,包括 1 次插入10 次删除
  1. 1
    3
      react/features/video-layout/components/TileViewButton.js
  2. 0
    7
      react/features/video-layout/functions.js

+ 1
- 3
react/features/video-layout/components/TileViewButton.js 查看文件

@@ -9,7 +9,6 @@ import {
9 9
 import { TILE_VIEW_ENABLED, getFeatureFlag } from '../../base/flags';
10 10
 import { translate } from '../../base/i18n';
11 11
 import { IconTileView } from '../../base/icons';
12
-import { getParticipantCount } from '../../base/participants';
13 12
 import { connect } from '../../base/redux';
14 13
 import { AbstractButton, type AbstractButtonProps } from '../../base/toolbox/components';
15 14
 import { setTileView } from '../actions';
@@ -87,8 +86,7 @@ class TileViewButton<P: Props> extends AbstractButton<P, *> {
87 86
  */
88 87
 function _mapStateToProps(state, ownProps) {
89 88
     const enabled = getFeatureFlag(state, TILE_VIEW_ENABLED, true);
90
-    const lonelyMeeting = getParticipantCount(state) < 2;
91
-    const { visible = enabled && !lonelyMeeting } = ownProps;
89
+    const { visible = enabled } = ownProps;
92 90
 
93 91
     return {
94 92
         _tileViewEnabled: shouldDisplayTileView(state),

+ 0
- 7
react/features/video-layout/functions.js 查看文件

@@ -107,13 +107,6 @@ export function getTileViewGridDimensions(state: Object) {
107 107
 export function shouldDisplayTileView(state: Object = {}) {
108 108
     const participantCount = getParticipantCount(state);
109 109
 
110
-    // In case of a lonely meeting, we don't allow tile view.
111
-    // But it's a special case too, as we don't even render the button,
112
-    // see TileViewButton component.
113
-    if (participantCount < 2) {
114
-        return false;
115
-    }
116
-
117 110
     const tileViewEnabledFeatureFlag = getFeatureFlag(state, TILE_VIEW_ENABLED, true);
118 111
     const { disableTileView } = state['features/base/config'];
119 112
 

Loading…
取消
儲存