|
@@ -6,7 +6,6 @@ import LinearGradient from 'react-native-linear-gradient';
|
6
|
6
|
|
7
|
7
|
import { appNavigate } from '../../../app';
|
8
|
8
|
import { PIP_ENABLED, getFeatureFlag } from '../../../base/flags';
|
9
|
|
-import { getParticipantCount } from '../../../base/participants';
|
10
|
9
|
import { Container, LoadingIndicator, TintedView } from '../../../base/react';
|
11
|
10
|
import { connect } from '../../../base/redux';
|
12
|
11
|
import {
|
|
@@ -27,7 +26,7 @@ import { LargeVideo } from '../../../large-video';
|
27
|
26
|
import { BackButtonRegistry } from '../../../mobile/back-button';
|
28
|
27
|
import { AddPeopleDialog, CalleeInfoContainer } from '../../../invite';
|
29
|
28
|
import { Captions } from '../../../subtitles';
|
30
|
|
-import { setToolboxVisible, Toolbox } from '../../../toolbox';
|
|
29
|
+import { isToolboxVisible, setToolboxVisible, Toolbox } from '../../../toolbox';
|
31
|
30
|
|
32
|
31
|
import {
|
33
|
32
|
AbstractConference,
|
|
@@ -73,13 +72,6 @@ type Props = AbstractProps & {
|
73
|
72
|
*/
|
74
|
73
|
_largeVideoParticipantId: string,
|
75
|
74
|
|
76
|
|
- /**
|
77
|
|
- * The number of participants in the conference.
|
78
|
|
- *
|
79
|
|
- * @private
|
80
|
|
- */
|
81
|
|
- _participantCount: number,
|
82
|
|
-
|
83
|
75
|
/**
|
84
|
76
|
* Whether Picture-in-Picture is enabled.
|
85
|
77
|
*
|
|
@@ -147,35 +139,6 @@ class Conference extends AbstractConference<Props, *> {
|
147
|
139
|
*/
|
148
|
140
|
componentDidMount() {
|
149
|
141
|
BackButtonRegistry.addListener(this._onHardwareBackPress);
|
150
|
|
-
|
151
|
|
- // Show the toolbox if we are the only participant; otherwise, the whole
|
152
|
|
- // UI looks too unpopulated the LargeVideo visible.
|
153
|
|
- this.props._participantCount === 1 && this._setToolboxVisible(true);
|
154
|
|
- }
|
155
|
|
-
|
156
|
|
- /**
|
157
|
|
- * Implements React's {@link Component#componentDidUpdate()}.
|
158
|
|
- *
|
159
|
|
- * @inheritdoc
|
160
|
|
- */
|
161
|
|
- componentDidUpdate(prevProps: Props) {
|
162
|
|
- const {
|
163
|
|
- _participantCount: oldParticipantCount
|
164
|
|
- } = prevProps;
|
165
|
|
- const {
|
166
|
|
- _participantCount: newParticipantCount,
|
167
|
|
- _toolboxVisible
|
168
|
|
- } = this.props;
|
169
|
|
-
|
170
|
|
- if (oldParticipantCount === 1
|
171
|
|
- && newParticipantCount > 1
|
172
|
|
- && _toolboxVisible) {
|
173
|
|
- this._setToolboxVisible(false);
|
174
|
|
- } else if (oldParticipantCount > 1
|
175
|
|
- && newParticipantCount === 1
|
176
|
|
- && !_toolboxVisible) {
|
177
|
|
- this._setToolboxVisible(true);
|
178
|
|
- }
|
179
|
142
|
}
|
180
|
143
|
|
181
|
144
|
/**
|
|
@@ -418,7 +381,6 @@ function _mapStateToProps(state) {
|
418
|
381
|
leaving
|
419
|
382
|
} = state['features/base/conference'];
|
420
|
383
|
const { reducedUI } = state['features/base/responsive-ui'];
|
421
|
|
- const { visible } = state['features/toolbox'];
|
422
|
384
|
|
423
|
385
|
// XXX There is a window of time between the successful establishment of the
|
424
|
386
|
// XMPP connection and the subsequent commencement of joining the MUC during
|
|
@@ -464,14 +426,6 @@ function _mapStateToProps(state) {
|
464
|
426
|
*/
|
465
|
427
|
_largeVideoParticipantId: state['features/large-video'].participantId,
|
466
|
428
|
|
467
|
|
- /**
|
468
|
|
- * The number of participants in the conference.
|
469
|
|
- *
|
470
|
|
- * @private
|
471
|
|
- * @type {number}
|
472
|
|
- */
|
473
|
|
- _participantCount: getParticipantCount(state),
|
474
|
|
-
|
475
|
429
|
/**
|
476
|
430
|
* Whether Picture-in-Picture is enabled.
|
477
|
431
|
*
|
|
@@ -495,7 +449,7 @@ function _mapStateToProps(state) {
|
495
|
449
|
* @private
|
496
|
450
|
* @type {boolean}
|
497
|
451
|
*/
|
498
|
|
- _toolboxVisible: visible
|
|
452
|
+ _toolboxVisible: isToolboxVisible(state)
|
499
|
453
|
};
|
500
|
454
|
}
|
501
|
455
|
|