mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-14 17:07:48 +00:00
Remove some Flow annotations
This commit is contained in:
committed by
Zoltan Bettenbuk
parent
19e8e8710a
commit
2a5adfc601
@@ -55,8 +55,6 @@ export default class BaseApp extends Component<*, State> {
|
||||
|
||||
this.state = {
|
||||
route: {},
|
||||
|
||||
// $FlowFixMe
|
||||
store: undefined
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import React, { Component, type Node } from 'react';
|
||||
import { TouchableWithoutFeedback, View } from 'react-native';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { ColorSchemeRegistry } from '../../../color-scheme';
|
||||
import { Modal } from '../../../react';
|
||||
import { connect } from '../../../redux';
|
||||
import { StyleType } from '../../../styles';
|
||||
|
||||
import { bottomSheetStyles as styles } from './styles';
|
||||
@@ -107,5 +107,4 @@ function _mapStateToProps(state) {
|
||||
};
|
||||
}
|
||||
|
||||
// $FlowExpectedError
|
||||
export default connect(_mapStateToProps)(BottomSheet);
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
import React from 'react';
|
||||
import { Text, TouchableOpacity } from 'react-native';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { translate } from '../../../i18n';
|
||||
import { connect } from '../../../redux';
|
||||
import { StyleType } from '../../../styles';
|
||||
|
||||
import { _abstractMapStateToProps } from '../../functions';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// @flow
|
||||
|
||||
import { connect } from 'react-redux';
|
||||
import { connect } from '../../../redux';
|
||||
|
||||
import { _abstractMapStateToProps } from '../../functions';
|
||||
|
||||
@@ -21,5 +21,4 @@ class CustomDialog extends BaseDialog<Props, *> {
|
||||
}
|
||||
}
|
||||
|
||||
// $FlowExpectedError
|
||||
export default connect(_abstractMapStateToProps)(CustomDialog);
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
// @flow
|
||||
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { translate } from '../../../i18n';
|
||||
import { connect } from '../../../redux';
|
||||
|
||||
import { _abstractMapStateToProps } from '../../functions';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { connect } from '../../../redux';
|
||||
|
||||
import AbstractDialogContainer, {
|
||||
abstractMapStateToProps
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
import React from 'react';
|
||||
import { View, Text, TextInput, TouchableOpacity } from 'react-native';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { translate } from '../../../i18n';
|
||||
import { connect } from '../../../redux';
|
||||
import { StyleType } from '../../../styles';
|
||||
|
||||
import { _abstractMapStateToProps } from '../../functions';
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
// @flow
|
||||
|
||||
import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { connect } from '../../../redux';
|
||||
|
||||
import AbstractDialog from '../AbstractDialog';
|
||||
import type { Props as AbstractDialogProps, State } from '../AbstractDialog';
|
||||
@@ -84,5 +85,4 @@ class Dialog extends AbstractDialog<Props, State> {
|
||||
_onSubmit: (?string) => void;
|
||||
}
|
||||
|
||||
// $FlowExpectedError
|
||||
export default connect()(Dialog);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { ModalTransition } from '@atlaskit/modal-dialog';
|
||||
import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { connect } from '../../../redux';
|
||||
|
||||
import AbstractDialogContainer, {
|
||||
abstractMapStateToProps
|
||||
|
||||
@@ -63,13 +63,10 @@ export function getLocalizedDurationFormatter(duration: number) {
|
||||
// showing the hour and we want to include the hour if the conference is
|
||||
// more than an hour long
|
||||
|
||||
// $FlowFixMe
|
||||
if (moment.duration(duration).format('h') !== '0') {
|
||||
// $FlowFixMe
|
||||
return moment.duration(duration).format('h:mm:ss');
|
||||
}
|
||||
|
||||
// $FlowFixMe
|
||||
return moment.duration(duration).format('mm:ss', { trim: false });
|
||||
}
|
||||
|
||||
@@ -97,8 +94,6 @@ function _getSupportedLocale() {
|
||||
// FIXME The flow-type definition of moment is v2.3 while our
|
||||
// package.json states v2.19 so maybe locales on moment was
|
||||
// introduced in between?
|
||||
//
|
||||
// $FlowFixMe
|
||||
= moment.locales().find(lang => currentLocaleRegexp.exec(lang));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import { Component } from 'react';
|
||||
* playback.
|
||||
*/
|
||||
export type AudioElement = {
|
||||
currentTime?: number,
|
||||
currentTime: number,
|
||||
pause: () => void,
|
||||
play: () => void,
|
||||
setSinkId?: string => void,
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
import React from 'react';
|
||||
import { View } from 'react-native';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { connect } from '../../../redux';
|
||||
|
||||
import AbstractVideoTrack from '../AbstractVideoTrack';
|
||||
import type { Props } from '../AbstractVideoTrack';
|
||||
@@ -29,5 +30,4 @@ class VideoTrack extends AbstractVideoTrack<Props> {
|
||||
}
|
||||
}
|
||||
|
||||
// $FlowExpectedError
|
||||
export default connect()(VideoTrack);
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { PanResponder, PixelRatio, View } from 'react-native';
|
||||
import { connect } from 'react-redux';
|
||||
import { type Dispatch } from 'redux';
|
||||
|
||||
import { connect } from '../../../redux';
|
||||
|
||||
import type { PanResponderInstance } from 'PanResponder';
|
||||
|
||||
import { storeVideoTransform } from '../../actions';
|
||||
@@ -727,5 +728,4 @@ function _mapStateToProps(state) {
|
||||
};
|
||||
}
|
||||
|
||||
// $FlowExpectedError
|
||||
export default connect(_mapStateToProps, _mapDispatchToProps)(VideoTransform);
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
/* @flow */
|
||||
|
||||
import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { connect } from '../../../redux';
|
||||
|
||||
import AbstractVideoTrack from '../AbstractVideoTrack';
|
||||
import type { Props as AbstractVideoTrackProps } from '../AbstractVideoTrack';
|
||||
@@ -63,5 +64,4 @@ class VideoTrack extends AbstractVideoTrack<Props> {
|
||||
_onVideoPlaying: () => void;
|
||||
}
|
||||
|
||||
// $FlowExpectedError
|
||||
export default connect()(VideoTrack);
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
|
||||
import React, { Component, Fragment, PureComponent } from 'react';
|
||||
import { Dimensions, Image, Platform, View } from 'react-native';
|
||||
import FastImage from 'react-native-fast-image';
|
||||
import FastImage, {
|
||||
type CacheControls,
|
||||
type Priorities
|
||||
} from 'react-native-fast-image';
|
||||
|
||||
import { ColorPalette } from '../../styles';
|
||||
|
||||
@@ -63,7 +66,12 @@ type State = {
|
||||
/**
|
||||
* Source for the non-local avatar.
|
||||
*/
|
||||
source: { uri: ?string }
|
||||
source: {
|
||||
uri?: string,
|
||||
headers?: Object,
|
||||
priority?: Priorities,
|
||||
cache?: CacheControls,
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -261,7 +269,7 @@ class AvatarContent extends Component<Props, State> {
|
||||
}
|
||||
}
|
||||
|
||||
return (// $FlowFixMe
|
||||
return (
|
||||
<FastImage
|
||||
onError = { this._onAvatarLoadError }
|
||||
onLoadEnd = { this._onAvatarLoaded }
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Text, View } from 'react-native';
|
||||
import FastImage from 'react-native-fast-image';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { translate } from '../../i18n';
|
||||
import { JitsiParticipantConnectionStatus } from '../../lib-jitsi-meet';
|
||||
@@ -12,6 +11,7 @@ import {
|
||||
VideoTrack
|
||||
} from '../../media';
|
||||
import { Container, TintedView } from '../../react';
|
||||
import { connect } from '../../redux';
|
||||
import { StyleType } from '../../styles';
|
||||
import { TestHint } from '../../testing/components';
|
||||
import { getTrackByMediaTypeAndParticipant } from '../../tracks';
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { TouchableOpacity } from 'react-native';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { ColorSchemeRegistry } from '../../../color-scheme';
|
||||
import { Icon } from '../../../font-icons';
|
||||
import { connect } from '../../../redux';
|
||||
|
||||
/**
|
||||
* The type of the React {@code Component} props of {@link BackButton}
|
||||
@@ -68,5 +68,4 @@ function _mapStateToProps(state) {
|
||||
};
|
||||
}
|
||||
|
||||
// $FlowExpectedError
|
||||
export default connect(_mapStateToProps)(BackButton);
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { Text, TouchableOpacity } from 'react-native';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { ColorSchemeRegistry } from '../../../color-scheme';
|
||||
import { translate } from '../../../i18n';
|
||||
import { connect } from '../../../redux';
|
||||
|
||||
/**
|
||||
* The type of the React {@code Component} props of {@link ForwardButton}
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
import React, { Component, type Node } from 'react';
|
||||
import { Platform, SafeAreaView, StatusBar, View } from 'react-native';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { ColorSchemeRegistry } from '../../../color-scheme';
|
||||
import { connect } from '../../../redux';
|
||||
import { isDarkColor } from '../../../styles';
|
||||
|
||||
import { HEADER_PADDING } from './headerstyles';
|
||||
@@ -165,5 +165,4 @@ function _mapStateToProps(state) {
|
||||
};
|
||||
}
|
||||
|
||||
// $FlowExpectedError
|
||||
export default connect(_mapStateToProps)(Header);
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { Text, View } from 'react-native';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { ColorSchemeRegistry } from '../../../color-scheme';
|
||||
import { translate } from '../../../i18n';
|
||||
import { connect } from '../../../redux';
|
||||
|
||||
/**
|
||||
* The type of the React {@code Component} props of {@link HeaderLabel}
|
||||
|
||||
@@ -11,7 +11,7 @@ type Props = {
|
||||
* Prop to set the size of the indicator. This is the same as the
|
||||
* prop of the native component.
|
||||
*/
|
||||
size: 'large' | 'medium' | 'small'
|
||||
size: 'large' | 'small'
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -40,7 +40,7 @@ export default class LoadingIndicator extends Component<Props> {
|
||||
size
|
||||
};
|
||||
|
||||
return (// $FlowFixMe
|
||||
return (
|
||||
<ActivityIndicator
|
||||
animating = { true }
|
||||
color = { ColorPalette.white }
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { SafeAreaView, Text, TouchableOpacity, View } from 'react-native';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { Icon } from '../../../font-icons';
|
||||
import { connect } from '../../../redux';
|
||||
|
||||
import styles from './styles';
|
||||
|
||||
@@ -283,5 +283,4 @@ class PagedList extends Component<Props, State> {
|
||||
}
|
||||
}
|
||||
|
||||
// $FlowExpectedError
|
||||
export default connect()(PagedList);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/* @flow */
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { translate } from '../../../i18n';
|
||||
import { connect } from '../../../redux';
|
||||
|
||||
declare var interfaceConfig: Object;
|
||||
|
||||
@@ -242,5 +242,4 @@ function _mapStateToProps(state) {
|
||||
};
|
||||
}
|
||||
|
||||
// $FlowExpectedError
|
||||
export default connect(_mapStateToProps)(translate(Watermarks));
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// @flow
|
||||
|
||||
import _ from 'lodash';
|
||||
import { connect as reduxConnect } from 'react-redux';
|
||||
|
||||
/**
|
||||
* Sets specific properties of a specific state to specific values and prevents
|
||||
@@ -25,6 +26,19 @@ export function assign(target: Object, source: Object) {
|
||||
return t;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper function for the react-redux connect function to avoid having to
|
||||
* declare function types for flow, but still let flow warn for other errors.
|
||||
*
|
||||
* @param {Function?} mapStateToProps - Redux mapStateToProps function.
|
||||
* @param {Function?} mapDispatchToProps - Redux mapDispatchToProps function.
|
||||
* @returns {Connector}
|
||||
*/
|
||||
export function connect(
|
||||
mapStateToProps?: Function, mapDispatchToProps?: Function) {
|
||||
return reduxConnect<*, *, *, *, *, *>(mapStateToProps, mapDispatchToProps);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether {@code a} equals {@code b} according to deep comparison
|
||||
* (which makes sense for Redux and its state definition).
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
// @flow
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { connect } from '../../redux';
|
||||
|
||||
import { ASPECT_RATIO_NARROW, ASPECT_RATIO_WIDE } from '../constants';
|
||||
|
||||
@@ -51,7 +52,6 @@ export function makeAspectRatioAware(
|
||||
}
|
||||
}
|
||||
|
||||
// $FlowFixMe
|
||||
return connect(_mapStateToProps)(AspectRatioAware);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
// @flow
|
||||
|
||||
import React, { Component, type Node } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { type Dispatch } from 'redux';
|
||||
|
||||
import { connect } from '../../redux';
|
||||
|
||||
import { setAspectRatio } from '../actions';
|
||||
import DimensionsDetector from './DimensionsDetector';
|
||||
|
||||
@@ -69,5 +70,4 @@ function _mapDispatchToProps(dispatch: Dispatch<any>) {
|
||||
};
|
||||
}
|
||||
|
||||
// $FlowExpectedError
|
||||
export default connect(undefined, _mapDispatchToProps)(AspectRatioDetector);
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
// @flow
|
||||
|
||||
import React, { Component, type Node } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { type Dispatch } from 'redux';
|
||||
|
||||
import { connect } from '../../redux';
|
||||
|
||||
import { setReducedUI } from '../actions';
|
||||
import DimensionsDetector from './DimensionsDetector';
|
||||
|
||||
@@ -70,5 +71,4 @@ function _mapDispatchToProps(dispatch: Dispatch<any>) {
|
||||
};
|
||||
}
|
||||
|
||||
// $FlowExpectedError
|
||||
export default connect(undefined, _mapDispatchToProps)(ReducedUIDetector);
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// @flow
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { Audio } from '../../media';
|
||||
import type { AudioElement } from '../../media';
|
||||
import { connect } from '../../redux';
|
||||
|
||||
import { _addAudioElement, _removeAudioElement } from '../actions';
|
||||
import type { Sound } from '../reducer';
|
||||
@@ -153,5 +153,4 @@ export function _mapDispatchToProps(dispatch: Function) {
|
||||
};
|
||||
}
|
||||
|
||||
// $FlowExpectedError
|
||||
export default connect(_mapStateToProps, _mapDispatchToProps)(SoundCollection);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// @flow
|
||||
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { getLocalParticipant } from '../../participants';
|
||||
import { connect } from '../../redux';
|
||||
|
||||
// FIXME this imports feature to 'base'
|
||||
import { statsEmitter } from '../../../connection-indicator';
|
||||
@@ -215,5 +215,4 @@ function _mapStateToProps(state) {
|
||||
};
|
||||
}
|
||||
|
||||
// $FlowExpectedError
|
||||
export default connect(_mapStateToProps)(TestConnectionInfo);
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
/* @flow */
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { Text } from 'react-native';
|
||||
|
||||
import { connect } from '../../redux';
|
||||
|
||||
import type { TestHintProps } from './AbstractTestHint';
|
||||
import { _mapStateToProps } from './AbstractTestHint';
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
/* @flow */
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { Text } from 'react-native';
|
||||
|
||||
import { connect } from '../../redux';
|
||||
|
||||
import type { TestHintProps } from './AbstractTestHint';
|
||||
import { _mapStateToProps } from './AbstractTestHint';
|
||||
|
||||
@@ -34,5 +35,4 @@ class TestHint extends Component<TestHintProps> {
|
||||
}
|
||||
}
|
||||
|
||||
// $FlowExpectedError
|
||||
export default connect(_mapStateToProps)(TestHint);
|
||||
|
||||
Reference in New Issue
Block a user