From 7162080d0046cc26d3c0f2e67834348933b10025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Wed, 3 Oct 2018 11:29:19 +0200 Subject: [PATCH] feat(flow): tame the beast --- react/features/base/conference/reducer.js | 5 ++++ react/features/base/i18n/i18next.js | 2 +- .../react/components/AbstractContainer.js | 1 + .../base/react/components/native/Container.js | 2 +- react/features/calendar-sync/reducer.js | 1 + .../audio-mode/components/AudioRouteButton.js | 2 +- .../LiveStream/StreamKeyForm.web.js | 2 +- react/features/settings/functions.js | 3 +- react/features/toolbox/middleware.js | 28 +++++++++++-------- .../welcome/components/VideoSwitch.js | 4 +-- 10 files changed, 32 insertions(+), 18 deletions(-) diff --git a/react/features/base/conference/reducer.js b/react/features/base/conference/reducer.js index f220f701f..43ac2df34 100644 --- a/react/features/base/conference/reducer.js +++ b/react/features/base/conference/reducer.js @@ -28,8 +28,13 @@ import { VIDEO_QUALITY_LEVELS } from './constants'; import { isRoomValid } from './functions'; const DEFAULT_STATE = { + conference: undefined, joining: undefined, + leaving: undefined, + locked: undefined, maxReceiverVideoQuality: VIDEO_QUALITY_LEVELS.HIGH, + password: undefined, + passwordRequired: undefined, preferredReceiverVideoQuality: VIDEO_QUALITY_LEVELS.HIGH }; diff --git a/react/features/base/i18n/i18next.js b/react/features/base/i18n/i18next.js index 6e9d9b6bd..919e20273 100644 --- a/react/features/base/i18n/i18next.js +++ b/react/features/base/i18n/i18next.js @@ -18,7 +18,7 @@ declare var interfaceConfig: Object; * @public * @type {Array} */ -export const LANGUAGES = Object.keys(LANGUAGES_RESOURCES); +export const LANGUAGES: Array = Object.keys(LANGUAGES_RESOURCES); /** * The default language. diff --git a/react/features/base/react/components/AbstractContainer.js b/react/features/base/react/components/AbstractContainer.js index 14f90663d..7d0bdade7 100644 --- a/react/features/base/react/components/AbstractContainer.js +++ b/react/features/base/react/components/AbstractContainer.js @@ -95,6 +95,7 @@ export default class AbstractContainer extends Component

{ ...filteredProps } = props || this.props; + // $FlowFixMe return React.createElement(type, filteredProps, children); } } diff --git a/react/features/base/react/components/native/Container.js b/react/features/base/react/components/native/Container.js index 95c7c2080..08a218cc9 100644 --- a/react/features/base/react/components/native/Container.js +++ b/react/features/base/react/components/native/Container.js @@ -58,7 +58,7 @@ export default class Container extends AbstractContainer

{ accessibilityLabel, accessible, onPress: onClick, - underlayColor + ...touchFeedback && { underlayColor } }, element); } diff --git a/react/features/calendar-sync/reducer.js b/react/features/calendar-sync/reducer.js index 0e1918389..144500c39 100644 --- a/react/features/calendar-sync/reducer.js +++ b/react/features/calendar-sync/reducer.js @@ -62,6 +62,7 @@ isCalendarEnabled() // knownDomains. At this point, it should have already been // translated into the new state format (namely, base/known-domains) // and the app no longer needs it. + // $FlowFixMe if (typeof state.knownDomains !== 'undefined') { return set(state, 'knownDomains', undefined); } diff --git a/react/features/mobile/audio-mode/components/AudioRouteButton.js b/react/features/mobile/audio-mode/components/AudioRouteButton.js index 44768454e..0d1c75f90 100644 --- a/react/features/mobile/audio-mode/components/AudioRouteButton.js +++ b/react/features/mobile/audio-mode/components/AudioRouteButton.js @@ -22,7 +22,7 @@ import AudioRoutePickerDialog from './AudioRoutePickerDialog'; */ const MPVolumeView = NativeModules.MPVolumeViewManager - && requireNativeComponent('MPVolumeView', null); + && requireNativeComponent('MPVolumeView'); /** * The style required to hide the {@code MPVolumeView}, since it's displayed diff --git a/react/features/recording/components/LiveStream/StreamKeyForm.web.js b/react/features/recording/components/LiveStream/StreamKeyForm.web.js index e88b906c9..97c0cac0a 100644 --- a/react/features/recording/components/LiveStream/StreamKeyForm.web.js +++ b/react/features/recording/components/LiveStream/StreamKeyForm.web.js @@ -52,7 +52,7 @@ class StreamKeyForm extends AbstractStreamKeyForm { shouldFitContainer = { true } type = 'text' value = { this.state.value } /> - { this.props.helpURL + { this.helpURL ?

{