소스 검색

Fix error on conference join when calendar is disabled

master
zbettenbuk 7 년 전
부모
커밋
54b6db02d8

+ 4
- 1
react/features/calendar-sync/components/ConferenceNotification.native.js 파일 보기

10
 import { getLocalizedDateFormatter, translate } from '../../base/i18n';
10
 import { getLocalizedDateFormatter, translate } from '../../base/i18n';
11
 import { ASPECT_RATIO_NARROW } from '../../base/responsive-ui';
11
 import { ASPECT_RATIO_NARROW } from '../../base/responsive-ui';
12
 
12
 
13
+import { CALENDAR_ENABLED } from '../constants';
13
 import styles from './styles';
14
 import styles from './styles';
14
 
15
 
15
 const ALERT_MILLISECONDS = 5 * 60 * 1000;
16
 const ALERT_MILLISECONDS = 5 * 60 * 1000;
278
     };
279
     };
279
 }
280
 }
280
 
281
 
281
-export default translate(connect(_mapStateToProps)(ConferenceNotification));
282
+export default CALENDAR_ENABLED
283
+    ? translate(connect(_mapStateToProps)(ConferenceNotification))
284
+    : undefined;

+ 18
- 1
react/features/conference/components/Conference.native.js 파일 보기

234
                 </View>
234
                 </View>
235
                 <TestConnectionInfo />
235
                 <TestConnectionInfo />
236
 
236
 
237
-                <ConferenceNotification />
237
+                {
238
+                    this._renderConferenceNotification()
239
+                }
238
 
240
 
239
                 {/*
241
                 {/*
240
                   * The dialogs are in the topmost stacking layers.
242
                   * The dialogs are in the topmost stacking layers.
290
         return this._backHandler && this.props._onHardwareBackPress();
292
         return this._backHandler && this.props._onHardwareBackPress();
291
     }
293
     }
292
 
294
 
295
+    /**
296
+     * Renders the conference notification badge if the feature is enabled.
297
+     *
298
+     * Note: If the calendar feature is disabled on a platform, then we don't
299
+     * have its components exported so an undefined check is necessary.
300
+     *
301
+     * @private
302
+     * @returns {React$Node}
303
+     */
304
+    _renderConferenceNotification() {
305
+        return ConferenceNotification
306
+            ? <ConferenceNotification />
307
+            : undefined;
308
+    }
309
+
293
     /**
310
     /**
294
      * Triggers the default Toolbox timeout.
311
      * Triggers the default Toolbox timeout.
295
      *
312
      *

Loading…
취소
저장