Fix error on conference join when calendar is disabled

pull/2898/head jitsi-meet_3003
zbettenbuk 7 years ago committed by Paweł Domas
parent 68608478f6
commit 54b6db02d8
  1. 5
      react/features/calendar-sync/components/ConferenceNotification.native.js
  2. 19
      react/features/conference/components/Conference.native.js

@ -10,6 +10,7 @@ import { Icon } from '../../base/font-icons';
import { getLocalizedDateFormatter, translate } from '../../base/i18n';
import { ASPECT_RATIO_NARROW } from '../../base/responsive-ui';
import { CALENDAR_ENABLED } from '../constants';
import styles from './styles';
const ALERT_MILLISECONDS = 5 * 60 * 1000;
@ -278,4 +279,6 @@ function _mapStateToProps(state: Object) {
};
}
export default translate(connect(_mapStateToProps)(ConferenceNotification));
export default CALENDAR_ENABLED
? translate(connect(_mapStateToProps)(ConferenceNotification))
: undefined;

@ -234,7 +234,9 @@ class Conference extends Component<Props> {
</View>
<TestConnectionInfo />
<ConferenceNotification />
{
this._renderConferenceNotification()
}
{/*
* The dialogs are in the topmost stacking layers.
@ -290,6 +292,21 @@ class Conference extends Component<Props> {
return this._backHandler && this.props._onHardwareBackPress();
}
/**
* Renders the conference notification badge if the feature is enabled.
*
* Note: If the calendar feature is disabled on a platform, then we don't
* have its components exported so an undefined check is necessary.
*
* @private
* @returns {React$Node}
*/
_renderConferenceNotification() {
return ConferenceNotification
? <ConferenceNotification />
: undefined;
}
/**
* Triggers the default Toolbox timeout.
*

Loading…
Cancel
Save