[RN] Adjust Conference for the reduced UI mode (Coding style)
This commit is contained in:
parent
7a9ff9975a
commit
0bbcd3181c
|
@ -67,7 +67,8 @@ type Props = {
|
||||||
_onHardwareBackPress: Function,
|
_onHardwareBackPress: Function,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The indicator which determines if we are in reduced UI mode.
|
* The indicator which determines whether the UI is reduced (to accommodate
|
||||||
|
* smaller display areas).
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
|
@ -200,7 +201,7 @@ class Conference extends Component<Props> {
|
||||||
{/*
|
{/*
|
||||||
* If there is a ringing call, show the callee's info.
|
* If there is a ringing call, show the callee's info.
|
||||||
*/
|
*/
|
||||||
!this.props._reducedUI && <CalleeInfoContainer />
|
this.props._reducedUI || <CalleeInfoContainer />
|
||||||
}
|
}
|
||||||
|
|
||||||
{/*
|
{/*
|
||||||
|
@ -232,7 +233,7 @@ class Conference extends Component<Props> {
|
||||||
{/*
|
{/*
|
||||||
* The dialogs are in the topmost stacking layers.
|
* The dialogs are in the topmost stacking layers.
|
||||||
*/
|
*/
|
||||||
!this.props._reducedUI && <DialogContainer />
|
this.props._reducedUI || <DialogContainer />
|
||||||
}
|
}
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
|
@ -370,6 +371,7 @@ function _mapDispatchToProps(dispatch) {
|
||||||
* @private
|
* @private
|
||||||
* @returns {{
|
* @returns {{
|
||||||
* _connecting: boolean,
|
* _connecting: boolean,
|
||||||
|
* _reducedUI: boolean,
|
||||||
* _toolboxVisible: boolean
|
* _toolboxVisible: boolean
|
||||||
* }}
|
* }}
|
||||||
*/
|
*/
|
||||||
|
@ -403,7 +405,8 @@ function _mapStateToProps(state) {
|
||||||
_connecting: Boolean(connecting_),
|
_connecting: Boolean(connecting_),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The indicator which determines if we are in reduced UI mode.
|
* The indicator which determines whether the UI is reduced (to
|
||||||
|
* accommodate smaller display areas).
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import './route';
|
|
||||||
|
|
||||||
export * from './components';
|
export * from './components';
|
||||||
|
|
||||||
import './middleware';
|
import './middleware';
|
||||||
|
import './route';
|
||||||
|
|
|
@ -10,12 +10,13 @@ import { MiddlewareRegistry } from '../base/redux';
|
||||||
import { setFilmstripEnabled } from '../filmstrip';
|
import { setFilmstripEnabled } from '../filmstrip';
|
||||||
import { setToolboxEnabled } from '../toolbox';
|
import { setToolboxEnabled } from '../toolbox';
|
||||||
|
|
||||||
MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {
|
MiddlewareRegistry.register(store => next => action => {
|
||||||
const result = next(action);
|
const result = next(action);
|
||||||
|
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
case CONFERENCE_JOINED:
|
case CONFERENCE_JOINED:
|
||||||
case SET_REDUCED_UI: {
|
case SET_REDUCED_UI: {
|
||||||
|
const { dispatch, getState } = store;
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const { audioOnly } = state['features/base/conference'];
|
const { audioOnly } = state['features/base/conference'];
|
||||||
const { reducedUI } = state['features/base/responsive-ui'];
|
const { reducedUI } = state['features/base/responsive-ui'];
|
||||||
|
@ -25,12 +26,12 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {
|
||||||
|
|
||||||
// XXX: Currently setting the received video quality will disable
|
// XXX: Currently setting the received video quality will disable
|
||||||
// audio-only mode if engaged, that's why we check for it here.
|
// audio-only mode if engaged, that's why we check for it here.
|
||||||
if (!audioOnly) {
|
audioOnly
|
||||||
dispatch(setReceiveVideoQuality(
|
|| dispatch(
|
||||||
|
setReceiveVideoQuality(
|
||||||
reducedUI
|
reducedUI
|
||||||
? VIDEO_QUALITY_LEVELS.LOW
|
? VIDEO_QUALITY_LEVELS.LOW
|
||||||
: VIDEO_QUALITY_LEVELS.HIGH));
|
: VIDEO_QUALITY_LEVELS.HIGH));
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue