feat(flow): tame the beast
This commit is contained in:
parent
b71adbdf70
commit
7162080d00
|
@ -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
|
||||
};
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ declare var interfaceConfig: Object;
|
|||
* @public
|
||||
* @type {Array<string>}
|
||||
*/
|
||||
export const LANGUAGES = Object.keys(LANGUAGES_RESOURCES);
|
||||
export const LANGUAGES: Array<string> = Object.keys(LANGUAGES_RESOURCES);
|
||||
|
||||
/**
|
||||
* The default language.
|
||||
|
|
|
@ -95,6 +95,7 @@ export default class AbstractContainer<P: Props> extends Component<P> {
|
|||
...filteredProps
|
||||
} = props || this.props;
|
||||
|
||||
// $FlowFixMe
|
||||
return React.createElement(type, filteredProps, children);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ export default class Container<P: Props> extends AbstractContainer<P> {
|
|||
accessibilityLabel,
|
||||
accessible,
|
||||
onPress: onClick,
|
||||
underlayColor
|
||||
...touchFeedback && { underlayColor }
|
||||
},
|
||||
element);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -52,7 +52,7 @@ class StreamKeyForm extends AbstractStreamKeyForm {
|
|||
shouldFitContainer = { true }
|
||||
type = 'text'
|
||||
value = { this.state.value } />
|
||||
{ this.props.helpURL
|
||||
{ this.helpURL
|
||||
? <div className = 'form-footer'>
|
||||
<a
|
||||
className = 'helper-link'
|
||||
|
|
|
@ -34,7 +34,8 @@ export function normalizeUserInputURL(url: string) {
|
|||
const urlRegExp = new RegExp('^(\\w+://)?(.+)$');
|
||||
const urlComponents = urlRegExp.exec(url);
|
||||
|
||||
if (!urlComponents[1] || !urlComponents[1].startsWith('http')) {
|
||||
if (urlComponents && (!urlComponents[1]
|
||||
|| !urlComponents[1].startsWith('http'))) {
|
||||
url = `https://${urlComponents[2]}`;
|
||||
}
|
||||
|
||||
|
|
|
@ -62,9 +62,6 @@ function _setFullScreen(next, action) {
|
|||
|
||||
if (typeof documentElement.requestFullscreen === 'function') {
|
||||
documentElement.requestFullscreen();
|
||||
} else if (
|
||||
typeof documentElement.msRequestFullscreen === 'function') {
|
||||
documentElement.msRequestFullscreen();
|
||||
} else if (
|
||||
typeof documentElement.mozRequestFullScreen === 'function') {
|
||||
documentElement.mozRequestFullScreen();
|
||||
|
@ -72,14 +69,23 @@ function _setFullScreen(next, action) {
|
|||
typeof documentElement.webkitRequestFullscreen === 'function') {
|
||||
documentElement.webkitRequestFullscreen();
|
||||
}
|
||||
} else if (typeof document.exitFullscreen === 'function') {
|
||||
document.exitFullscreen();
|
||||
} else if (typeof document.msExitFullscreen === 'function') {
|
||||
document.msExitFullscreen();
|
||||
} else if (typeof document.mozCancelFullScreen === 'function') {
|
||||
document.mozCancelFullScreen();
|
||||
} else if (typeof document.webkitExitFullscreen === 'function') {
|
||||
document.webkitExitFullscreen();
|
||||
} else {
|
||||
/* eslint-disable no-lonely-if */
|
||||
|
||||
// $FlowFixMe
|
||||
if (typeof document.exitFullscreen === 'function') {
|
||||
document.exitFullscreen();
|
||||
|
||||
// $FlowFixMe
|
||||
} else if (typeof document.mozCancelFullScreen === 'function') {
|
||||
document.mozCancelFullScreen();
|
||||
|
||||
// $FlowFixMe
|
||||
} else if (typeof document.webkitExitFullscreen === 'function') {
|
||||
document.webkitExitFullscreen();
|
||||
}
|
||||
|
||||
/* eslint-enable no-loney-if */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -69,10 +69,10 @@ class VideoSwitch extends Component<Props> {
|
|||
</View>
|
||||
</TouchableWithoutFeedback>
|
||||
<Switch
|
||||
onTintColor = { SWITCH_UNDER_COLOR }
|
||||
onValueChange = { this._onStartAudioOnlyChange }
|
||||
style = { styles.audioVideoSwitch }
|
||||
thumbTintColor = { SWITCH_THUMB_COLOR }
|
||||
thumbColor = { SWITCH_THUMB_COLOR }
|
||||
trackColor = {{ true: SWITCH_UNDER_COLOR }}
|
||||
value = { _settings.startAudioOnly } />
|
||||
<TouchableWithoutFeedback
|
||||
onPress = { this._onStartAudioOnlyTrue }>
|
||||
|
|
Loading…
Reference in New Issue