Browse Source

feat(flow): tame the beast

master
Saúl Ibarra Corretgé 7 years ago
parent
commit
7162080d00

+ 5
- 0
react/features/base/conference/reducer.js View File

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

+ 1
- 1
react/features/base/i18n/i18next.js View File

18
  * @public
18
  * @public
19
  * @type {Array<string>}
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
  * The default language.
24
  * The default language.

+ 1
- 0
react/features/base/react/components/AbstractContainer.js View File

95
             ...filteredProps
95
             ...filteredProps
96
         } = props || this.props;
96
         } = props || this.props;
97
 
97
 
98
+        // $FlowFixMe
98
         return React.createElement(type, filteredProps, children);
99
         return React.createElement(type, filteredProps, children);
99
     }
100
     }
100
 }
101
 }

+ 1
- 1
react/features/base/react/components/native/Container.js View File

58
                         accessibilityLabel,
58
                         accessibilityLabel,
59
                         accessible,
59
                         accessible,
60
                         onPress: onClick,
60
                         onPress: onClick,
61
-                        underlayColor
61
+                        ...touchFeedback && { underlayColor }
62
                     },
62
                     },
63
                     element);
63
                     element);
64
         }
64
         }

+ 1
- 0
react/features/calendar-sync/reducer.js View File

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

+ 1
- 1
react/features/mobile/audio-mode/components/AudioRouteButton.js View File

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

+ 1
- 1
react/features/recording/components/LiveStream/StreamKeyForm.web.js View File

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

+ 2
- 1
react/features/settings/functions.js View File

34
         const urlRegExp = new RegExp('^(\\w+://)?(.+)$');
34
         const urlRegExp = new RegExp('^(\\w+://)?(.+)$');
35
         const urlComponents = urlRegExp.exec(url);
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
             url = `https://${urlComponents[2]}`;
39
             url = `https://${urlComponents[2]}`;
39
         }
40
         }
40
 
41
 

+ 17
- 11
react/features/toolbox/middleware.js View File

62
 
62
 
63
             if (typeof documentElement.requestFullscreen === 'function') {
63
             if (typeof documentElement.requestFullscreen === 'function') {
64
                 documentElement.requestFullscreen();
64
                 documentElement.requestFullscreen();
65
-            } else if (
66
-                typeof documentElement.msRequestFullscreen === 'function') {
67
-                documentElement.msRequestFullscreen();
68
             } else if (
65
             } else if (
69
                 typeof documentElement.mozRequestFullScreen === 'function') {
66
                 typeof documentElement.mozRequestFullScreen === 'function') {
70
                 documentElement.mozRequestFullScreen();
67
                 documentElement.mozRequestFullScreen();
72
                 typeof documentElement.webkitRequestFullscreen === 'function') {
69
                 typeof documentElement.webkitRequestFullscreen === 'function') {
73
                 documentElement.webkitRequestFullscreen();
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 View File

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

Loading…
Cancel
Save