Skip to content

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

Fix error on conference join when calendar is disabled

zbettenbuk54b6db02d827
diff --git a/react/features/calendar-sync/components/ConferenceNotification.native.js b/react/features/calendar-sync/components/ConferenceNotification.native.js
index b7fee65b7a..d7eeffc770 100644
--- a/react/features/calendar-sync/components/ConferenceNotification.native.js
+++ b/react/features/calendar-sync/components/ConferenceNotification.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;
diff --git a/react/features/conference/components/Conference.native.js b/react/features/conference/components/Conference.native.js
index 1bfeaf2fc7..5d64d9942a 100644
--- a/react/features/conference/components/Conference.native.js
+++ b/react/features/conference/components/Conference.native.js
@@ -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.
*