Fix flow errors from base/connection

This commit is contained in:
Bettenbuk Zoltan 2019-04-08 15:10:31 +02:00 committed by Saúl Ibarra Corretgé
parent 3987655f2a
commit 18d908ce84
4 changed files with 9 additions and 4 deletions

View File

@ -5,7 +5,8 @@ import { Text, TextInput, View } from 'react-native';
import { connect as reduxConnect } from 'react-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 {
CustomSubmitDialog,
FIELD_UNDERLINE,

View File

@ -1,3 +1,5 @@
// @flow
/**
* The type of (redux) action which signals that a connection disconnected.
*

View File

@ -8,16 +8,16 @@ import { toState } from '../redux';
*
* @param {Function|Object} stateOrGetState - The redux state or redux's
* {@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 locationURL
= state instanceof URL
? state
: state['features/base/connection'].locationURL;
return locationURL ? getURLWithoutParams(locationURL).href : undefined;
return getURLWithoutParams(locationURL).href;
}
/**

View File

@ -1,3 +1,5 @@
// @flow
export * from './actions';
export * from './actionTypes';
export * from './functions';