Fix flow errors from base/connection
This commit is contained in:
parent
3987655f2a
commit
18d908ce84
|
@ -5,7 +5,8 @@ import { Text, TextInput, View } from 'react-native';
|
||||||
import { connect as reduxConnect } from 'react-redux';
|
import { connect as reduxConnect } from 'react-redux';
|
||||||
import type { Dispatch } from 'redux';
|
import type { Dispatch } from 'redux';
|
||||||
|
|
||||||
import { connect, toJid } from '../../base/connection';
|
import { toJid } from '../../base/connection';
|
||||||
|
import { connect } from '../../base/connection/actions.native';
|
||||||
import {
|
import {
|
||||||
CustomSubmitDialog,
|
CustomSubmitDialog,
|
||||||
FIELD_UNDERLINE,
|
FIELD_UNDERLINE,
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
// @flow
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type of (redux) action which signals that a connection disconnected.
|
* The type of (redux) action which signals that a connection disconnected.
|
||||||
*
|
*
|
||||||
|
|
|
@ -8,16 +8,16 @@ import { toState } from '../redux';
|
||||||
*
|
*
|
||||||
* @param {Function|Object} stateOrGetState - The redux state or redux's
|
* @param {Function|Object} stateOrGetState - The redux state or redux's
|
||||||
* {@code getState} function.
|
* {@code getState} function.
|
||||||
* @returns {string|undefined}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
export function getInviteURL(stateOrGetState: Function | Object): ?string {
|
export function getInviteURL(stateOrGetState: Function | Object): string {
|
||||||
const state = toState(stateOrGetState);
|
const state = toState(stateOrGetState);
|
||||||
const locationURL
|
const locationURL
|
||||||
= state instanceof URL
|
= state instanceof URL
|
||||||
? state
|
? state
|
||||||
: state['features/base/connection'].locationURL;
|
: state['features/base/connection'].locationURL;
|
||||||
|
|
||||||
return locationURL ? getURLWithoutParams(locationURL).href : undefined;
|
return getURLWithoutParams(locationURL).href;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
// @flow
|
||||||
|
|
||||||
export * from './actions';
|
export * from './actions';
|
||||||
export * from './actionTypes';
|
export * from './actionTypes';
|
||||||
export * from './functions';
|
export * from './functions';
|
||||||
|
|
Loading…
Reference in New Issue