Selaa lähdekoodia

feat(flow): tame the beast

master
Saúl Ibarra Corretgé 7 vuotta sitten
vanhempi
commit
7162080d00

+ 5
- 0
react/features/base/conference/reducer.js Näytä tiedosto

@@ -28,8 +28,13 @@ import { VIDEO_QUALITY_LEVELS } from './constants';
28 28
 import { isRoomValid } from './functions';
29 29
 
30 30
 const DEFAULT_STATE = {
31
+    conference: undefined,
31 32
     joining: undefined,
33
+    leaving: undefined,
34
+    locked: undefined,
32 35
     maxReceiverVideoQuality: VIDEO_QUALITY_LEVELS.HIGH,
36
+    password: undefined,
37
+    passwordRequired: undefined,
33 38
     preferredReceiverVideoQuality: VIDEO_QUALITY_LEVELS.HIGH
34 39
 };
35 40
 

+ 1
- 1
react/features/base/i18n/i18next.js Näytä tiedosto

@@ -18,7 +18,7 @@ declare var interfaceConfig: Object;
18 18
  * @public
19 19
  * @type {Array<string>}
20 20
  */
21
-export const LANGUAGES = Object.keys(LANGUAGES_RESOURCES);
21
+export const LANGUAGES: Array<string> = Object.keys(LANGUAGES_RESOURCES);
22 22
 
23 23
 /**
24 24
  * The default language.

+ 1
- 0
react/features/base/react/components/AbstractContainer.js Näytä tiedosto

@@ -95,6 +95,7 @@ export default class AbstractContainer<P: Props> extends Component<P> {
95 95
             ...filteredProps
96 96
         } = props || this.props;
97 97
 
98
+        // $FlowFixMe
98 99
         return React.createElement(type, filteredProps, children);
99 100
     }
100 101
 }

+ 1
- 1
react/features/base/react/components/native/Container.js Näytä tiedosto

@@ -58,7 +58,7 @@ export default class Container<P: Props> extends AbstractContainer<P> {
58 58
                         accessibilityLabel,
59 59
                         accessible,
60 60
                         onPress: onClick,
61
-                        underlayColor
61
+                        ...touchFeedback && { underlayColor }
62 62
                     },
63 63
                     element);
64 64
         }

+ 1
- 0
react/features/calendar-sync/reducer.js Näytä tiedosto

@@ -62,6 +62,7 @@ isCalendarEnabled()
62 62
             // knownDomains. At this point, it should have already been
63 63
             // translated into the new state format (namely, base/known-domains)
64 64
             // and the app no longer needs it.
65
+            // $FlowFixMe
65 66
             if (typeof state.knownDomains !== 'undefined') {
66 67
                 return set(state, 'knownDomains', undefined);
67 68
             }

+ 1
- 1
react/features/mobile/audio-mode/components/AudioRouteButton.js Näytä tiedosto

@@ -22,7 +22,7 @@ import AudioRoutePickerDialog from './AudioRoutePickerDialog';
22 22
  */
23 23
 const MPVolumeView
24 24
     = NativeModules.MPVolumeViewManager
25
-        && requireNativeComponent('MPVolumeView', null);
25
+        && requireNativeComponent('MPVolumeView');
26 26
 
27 27
 /**
28 28
  * The style required to hide the {@code MPVolumeView}, since it's displayed

+ 1
- 1
react/features/recording/components/LiveStream/StreamKeyForm.web.js Näytä tiedosto

@@ -52,7 +52,7 @@ class StreamKeyForm extends AbstractStreamKeyForm {
52 52
                     shouldFitContainer = { true }
53 53
                     type = 'text'
54 54
                     value = { this.state.value } />
55
-                { this.props.helpURL
55
+                { this.helpURL
56 56
                     ? <div className = 'form-footer'>
57 57
                         <a
58 58
                             className = 'helper-link'

+ 2
- 1
react/features/settings/functions.js Näytä tiedosto

@@ -34,7 +34,8 @@ export function normalizeUserInputURL(url: string) {
34 34
         const urlRegExp = new RegExp('^(\\w+://)?(.+)$');
35 35
         const urlComponents = urlRegExp.exec(url);
36 36
 
37
-        if (!urlComponents[1] || !urlComponents[1].startsWith('http')) {
37
+        if (urlComponents && (!urlComponents[1]
38
+                || !urlComponents[1].startsWith('http'))) {
38 39
             url = `https://${urlComponents[2]}`;
39 40
         }
40 41
 

+ 17
- 11
react/features/toolbox/middleware.js Näytä tiedosto

@@ -62,9 +62,6 @@ function _setFullScreen(next, action) {
62 62
 
63 63
             if (typeof documentElement.requestFullscreen === 'function') {
64 64
                 documentElement.requestFullscreen();
65
-            } else if (
66
-                typeof documentElement.msRequestFullscreen === 'function') {
67
-                documentElement.msRequestFullscreen();
68 65
             } else if (
69 66
                 typeof documentElement.mozRequestFullScreen === 'function') {
70 67
                 documentElement.mozRequestFullScreen();
@@ -72,14 +69,23 @@ function _setFullScreen(next, action) {
72 69
                 typeof documentElement.webkitRequestFullscreen === 'function') {
73 70
                 documentElement.webkitRequestFullscreen();
74 71
             }
75
-        } else if (typeof document.exitFullscreen === 'function') {
76
-            document.exitFullscreen();
77
-        } else if (typeof document.msExitFullscreen === 'function') {
78
-            document.msExitFullscreen();
79
-        } else if (typeof document.mozCancelFullScreen === 'function') {
80
-            document.mozCancelFullScreen();
81
-        } else if (typeof document.webkitExitFullscreen === 'function') {
82
-            document.webkitExitFullscreen();
72
+        } else {
73
+            /* eslint-disable no-lonely-if */
74
+
75
+            // $FlowFixMe
76
+            if (typeof document.exitFullscreen === 'function') {
77
+                document.exitFullscreen();
78
+
79
+            // $FlowFixMe
80
+            } else if (typeof document.mozCancelFullScreen === 'function') {
81
+                document.mozCancelFullScreen();
82
+
83
+            // $FlowFixMe
84
+            } else if (typeof document.webkitExitFullscreen === 'function') {
85
+                document.webkitExitFullscreen();
86
+            }
87
+
88
+            /* eslint-enable no-loney-if */
83 89
         }
84 90
     }
85 91
 

+ 2
- 2
react/features/welcome/components/VideoSwitch.js Näytä tiedosto

@@ -69,10 +69,10 @@ class VideoSwitch extends Component<Props> {
69 69
                     </View>
70 70
                 </TouchableWithoutFeedback>
71 71
                 <Switch
72
-                    onTintColor = { SWITCH_UNDER_COLOR }
73 72
                     onValueChange = { this._onStartAudioOnlyChange }
74 73
                     style = { styles.audioVideoSwitch }
75
-                    thumbTintColor = { SWITCH_THUMB_COLOR }
74
+                    thumbColor = { SWITCH_THUMB_COLOR }
75
+                    trackColor = {{ true: SWITCH_UNDER_COLOR }}
76 76
                     value = { _settings.startAudioOnly } />
77 77
                 <TouchableWithoutFeedback
78 78
                     onPress = { this._onStartAudioOnlyTrue }>

Loading…
Peruuta
Tallenna