Skip to content

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

[RN] Adjust Conference for the reduced UI mode (Coding style)

Lyubo Marinov0bbcd3181cc6
diff --git a/react/features/conference/components/Conference.native.js b/react/features/conference/components/Conference.native.js
index 21d9ad2972..fbca9eaefa 100644
--- a/react/features/conference/components/Conference.native.js
+++ b/react/features/conference/components/Conference.native.js
@@ -67,7 +67,8 @@ type Props = {
_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
*/
@@ -200,7 +201,7 @@ class Conference extends Component<Props> {
{/*
* 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.
*/
- !this.props._reducedUI && <DialogContainer />
+ this.props._reducedUI || <DialogContainer />
}
</Container>
);
@@ -370,6 +371,7 @@ function _mapDispatchToProps(dispatch) {
* @private
* @returns {{
* _connecting: boolean,
+ * _reducedUI: boolean,
* _toolboxVisible: boolean
* }}
*/
@@ -403,7 +405,8 @@ function _mapStateToProps(state) {
_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
* @type {boolean}
diff --git a/react/features/conference/index.js b/react/features/conference/index.js
index 406ed90379..7115963a18 100644
--- a/react/features/conference/index.js
+++ b/react/features/conference/index.js
@@ -1,5 +1,4 @@
-import './route';
-
export * from './components';
import './middleware';
+import './route';
diff --git a/react/features/conference/middleware.js b/react/features/conference/middleware.js
index 6cda7d2be2..f21e70fc09 100644
--- a/react/features/conference/middleware.js
+++ b/react/features/conference/middleware.js
@@ -10,12 +10,13 @@ import { MiddlewareRegistry } from '../base/redux';
import { setFilmstripEnabled } from '../filmstrip';
import { setToolboxEnabled } from '../toolbox';
-MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {
+MiddlewareRegistry.register(store => next => action => {
const result = next(action);
switch (action.type) {
case CONFERENCE_JOINED:
case SET_REDUCED_UI: {
+ const { dispatch, getState } = store;
const state = getState();
const { audioOnly } = state['features/base/conference'];
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
// audio-only mode if engaged, that's why we check for it here.
- if (!audioOnly) {
- dispatch(setReceiveVideoQuality(
+ audioOnly
+ || dispatch(
+ setReceiveVideoQuality(
reducedUI
? VIDEO_QUALITY_LEVELS.LOW
: VIDEO_QUALITY_LEVELS.HIGH));
- }
break;
}