Ver código fonte

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

j8
Saúl Ibarra Corretgé 4 anos atrás
pai
commit
e0c77dcd95

+ 1
- 3
react/features/video-layout/components/TileViewButton.js Ver arquivo

9
 import { TILE_VIEW_ENABLED, getFeatureFlag } from '../../base/flags';
9
 import { TILE_VIEW_ENABLED, getFeatureFlag } from '../../base/flags';
10
 import { translate } from '../../base/i18n';
10
 import { translate } from '../../base/i18n';
11
 import { IconTileView } from '../../base/icons';
11
 import { IconTileView } from '../../base/icons';
12
-import { getParticipantCount } from '../../base/participants';
13
 import { connect } from '../../base/redux';
12
 import { connect } from '../../base/redux';
14
 import { AbstractButton, type AbstractButtonProps } from '../../base/toolbox/components';
13
 import { AbstractButton, type AbstractButtonProps } from '../../base/toolbox/components';
15
 import { setTileView } from '../actions';
14
 import { setTileView } from '../actions';
87
  */
86
  */
88
 function _mapStateToProps(state, ownProps) {
87
 function _mapStateToProps(state, ownProps) {
89
     const enabled = getFeatureFlag(state, TILE_VIEW_ENABLED, true);
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
     return {
91
     return {
94
         _tileViewEnabled: shouldDisplayTileView(state),
92
         _tileViewEnabled: shouldDisplayTileView(state),

+ 0
- 7
react/features/video-layout/functions.js Ver arquivo

107
 export function shouldDisplayTileView(state: Object = {}) {
107
 export function shouldDisplayTileView(state: Object = {}) {
108
     const participantCount = getParticipantCount(state);
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
     const tileViewEnabledFeatureFlag = getFeatureFlag(state, TILE_VIEW_ENABLED, true);
110
     const tileViewEnabledFeatureFlag = getFeatureFlag(state, TILE_VIEW_ENABLED, true);
118
     const { disableTileView } = state['features/base/config'];
111
     const { disableTileView } = state['features/base/config'];
119
 
112
 

Carregando…
Cancelar
Salvar