redux: refactor loading of middlewares and reducers

Up until now we relied on implicit loading of middlewares and reducers, through
having imports in each feature's index.js.

This leads to many complex import cycles which result in (sometimes) hard to fix
bugs in addition to (often) breaking mobile because a web-only feature gets
imported on mobile too, thanks to the implicit loading.

This PR changes that to make the process explicit. Both middlewares and reducers
are imported in a single place, the app entrypoint. They have been divided into
3 categories: any, web and native, which represent each of the platforms
  respectively.

Ideally no feature should have an index.js exporting actions, action types and
components, but that's a larger ordeal, so this is just the first step in
getting there. In order to both set example and avoid large cycles the app
feature has been refactored to not have an idex.js itself.
This commit is contained in:
Saúl Ibarra Corretgé 2020-06-04 16:09:13 +02:00 committed by Saúl Ibarra Corretgé
parent 80d7e5fb7f
commit 6e679f952f
138 changed files with 222 additions and 301 deletions

View File

@ -82,7 +82,7 @@ deploy-local:
.NOTPARALLEL: .NOTPARALLEL:
dev: deploy-init deploy-css deploy-rnnoise-binary deploy-lib-jitsi-meet deploy-libflac dev: deploy-init deploy-css deploy-rnnoise-binary deploy-lib-jitsi-meet deploy-libflac
$(WEBPACK_DEV_SERVER) $(WEBPACK_DEV_SERVER) --detect-circular-deps
source-package: source-package:
mkdir -p source_package/jitsi-meet/css && \ mkdir -p source_package/jitsi-meet/css && \

View File

@ -22,7 +22,7 @@ import {
maybeRedirectToWelcomePage, maybeRedirectToWelcomePage,
redirectToStaticPage, redirectToStaticPage,
reloadWithStoredParams reloadWithStoredParams
} from './react/features/app'; } from './react/features/app/actions';
import { import {
AVATAR_ID_COMMAND, AVATAR_ID_COMMAND,
AVATAR_URL_COMMAND, AVATAR_URL_COMMAND,

View File

@ -7,7 +7,7 @@ import AuthHandler from './modules/UI/authentication/AuthHandler';
import { import {
connectionEstablished, connectionEstablished,
connectionFailed connectionFailed
} from './react/features/base/connection'; } from './react/features/base/connection/actions';
import { import {
isFatalJitsiConnectionError, isFatalJitsiConnectionError,
JitsiConnectionErrors, JitsiConnectionErrors,

View File

@ -1,6 +1,6 @@
/* global $, APP, config */ /* global $, APP, config */
import { toJid } from '../../../react/features/base/connection'; import { toJid } from '../../../react/features/base/connection/functions';
import { import {
JitsiConnectionErrors JitsiConnectionErrors
} from '../../../react/features/base/lib-jitsi-meet'; } from '../../../react/features/base/lib-jitsi-meet';

View File

@ -1,5 +1,2 @@
export * from './AnalyticsEvents'; export * from './AnalyticsEvents';
export * from './functions'; export * from './functions';
import './middleware';
import './reducer';

View File

@ -3,12 +3,8 @@
import React, { Fragment } from 'react'; import React, { Fragment } from 'react';
import { BaseApp } from '../../base/app'; import { BaseApp } from '../../base/app';
import '../../base/lastn'; // Register lastN middleware
import { toURLString } from '../../base/util'; import { toURLString } from '../../base/util';
import '../../follow-me';
import { OverlayContainer } from '../../overlay'; import { OverlayContainer } from '../../overlay';
import '../../lobby'; // Import lobby function
import '../../rejoin'; // Enable rejoin analytics
import { appNavigate } from '../actions'; import { appNavigate } from '../actions';
import { getDefaultURL } from '../functions'; import { getDefaultURL } from '../functions';

View File

@ -2,32 +2,21 @@
import React from 'react'; import React from 'react';
import '../../analytics';
import '../../authentication';
import { setColorScheme } from '../../base/color-scheme'; import { setColorScheme } from '../../base/color-scheme';
import { DialogContainer } from '../../base/dialog'; import { DialogContainer } from '../../base/dialog';
import { CALL_INTEGRATION_ENABLED, updateFlags } from '../../base/flags'; import { CALL_INTEGRATION_ENABLED, updateFlags } from '../../base/flags';
import '../../base/jwt';
import { Platform } from '../../base/react'; import { Platform } from '../../base/react';
import { DimensionsDetector, clientResized } from '../../base/responsive-ui'; import { DimensionsDetector, clientResized } from '../../base/responsive-ui';
import { updateSettings } from '../../base/settings'; import { updateSettings } from '../../base/settings';
import '../../google-api';
import '../../mobile/audio-mode';
import '../../mobile/back-button';
import '../../mobile/background';
import '../../mobile/call-integration';
import '../../mobile/external-api';
import '../../mobile/full-screen';
import '../../mobile/permissions';
import '../../mobile/picture-in-picture';
import '../../mobile/proximity';
import '../../mobile/wake-lock';
import '../../mobile/watchos';
import logger from '../logger'; import logger from '../logger';
import { AbstractApp } from './AbstractApp'; import { AbstractApp } from './AbstractApp';
import type { Props as AbstractAppProps } from './AbstractApp'; import type { Props as AbstractAppProps } from './AbstractApp';
// Register middlewares and reducers.
import '../middlewares';
import '../reducers';
declare var __DEV__; declare var __DEV__;
/** /**

View File

@ -5,19 +5,13 @@ import React from 'react';
import { DialogContainer } from '../../base/dialog'; import { DialogContainer } from '../../base/dialog';
import { ChromeExtensionBanner } from '../../chrome-extension-banner'; import { ChromeExtensionBanner } from '../../chrome-extension-banner';
import '../../base/user-interaction';
import '../../chat';
import '../../external-api';
import '../../no-audio-signal';
import '../../noise-detection';
import '../../power-monitor';
import '../../room-lock';
import '../../talk-while-muted';
import '../../video-layout';
import '../../old-client-notification';
import { AbstractApp } from './AbstractApp'; import { AbstractApp } from './AbstractApp';
// Register middlewares and reducers.
import '../middlewares';
import '../reducers';
/** /**
* Root app {@code Component} on Web/React. * Root app {@code Component} on Web/React.
* *

View File

@ -1,7 +0,0 @@
// @flow
export * from './actions';
export * from './components';
export * from './functions';
import './middleware';

View File

@ -0,0 +1,46 @@
// @flow
import '../analytics/middleware';
import '../base/conference/middleware';
import '../base/config/middleware';
import '../base/jwt/middleware';
import '../base/known-domains/middleware';
import '../base/lastn/middleware';
import '../base/lib-jitsi-meet/middleware';
import '../base/logging/middleware';
import '../base/media/middleware';
import '../base/net-info/middleware';
import '../base/participants/middleware';
import '../base/redux/middleware';
import '../base/responsive-ui/middleware';
import '../base/settings/middleware';
import '../base/sounds/middleware';
import '../base/testing/middleware';
import '../base/tracks/middleware';
import '../base/user-interaction/middleware';
import '../calendar-sync/middleware';
import '../chat/middleware';
import '../conference/middleware';
import '../connection-indicator/middleware';
import '../deep-linking/middleware';
import '../device-selection/middleware';
import '../display-name/middleware';
import '../etherpad/middleware';
import '../filmstrip/middleware';
import '../follow-me/middleware';
import '../invite/middleware';
import '../large-video/middleware';
import '../lobby/middleware';
import '../notifications/middleware';
import '../overlay/middleware';
import '../recent-list/middleware';
import '../recording/middleware';
import '../rejoin/middleware';
import '../room-lock/middleware';
import '../subtitles/middleware';
import '../toolbox/middleware';
import '../transcribing/middleware';
import '../video-layout/middleware';
import '../videosipgw/middleware';
import './middleware';

View File

@ -0,0 +1,18 @@
// @flow
import '../authentication/middleware';
import '../mobile/audio-mode/middleware';
import '../mobile/back-button/middleware';
import '../mobile/background/middleware';
import '../mobile/call-integration/middleware';
import '../mobile/external-api/middleware';
import '../mobile/full-screen/middleware';
import '../mobile/incoming-call/middleware';
import '../mobile/permissions/middleware';
import '../mobile/proximity/middleware';
import '../mobile/wake-lock/middleware';
import '../mobile/watchos/middleware';
import '../share-room/middleware';
import '../youtube-player/middleware';
import './middlewares.any';

View File

@ -0,0 +1,16 @@
// @flow
import '../base/devices/middleware';
import '../e2ee/middleware';
import '../external-api/middleware';
import '../keyboard-shortcuts/middleware';
import '../local-recording/middleware';
import '../no-audio-signal/middleware';
import '../noise-detection/middleware';
import '../old-client-notification/middleware';
import '../power-monitor/middleware';
import '../prejoin/middleware';
import '../shared-video/middleware';
import '../talk-while-muted/middleware';
import './middlewares.any';

View File

@ -0,0 +1,49 @@
// @flow
import '../analytics/reducer';
import '../base/app/reducer';
import '../base/audio-only/reducer';
import '../base/color-scheme/reducer';
import '../base/conference/reducer';
import '../base/config/reducer';
import '../base/connection/reducer';
import '../base/dialog/reducer';
import '../base/flags/reducer';
import '../base/jwt/reducer';
import '../base/known-domains/reducer';
import '../base/lib-jitsi-meet/reducer';
import '../base/logging/reducer';
import '../base/media/reducer';
import '../base/modal/reducer';
import '../base/net-info/reducer';
import '../base/participants/reducer';
import '../base/responsive-ui/reducer';
import '../base/settings/reducer';
import '../base/sounds/reducer';
import '../base/testing/reducer';
import '../base/tracks/reducer';
import '../base/user-interaction/reducer';
import '../blur/reducer';
import '../calendar-sync/reducer';
import '../chat/reducer';
import '../deep-linking/reducer';
import '../device-selection/reducer';
import '../dropbox/reducer';
import '../etherpad/reducer';
import '../filmstrip/reducer';
import '../follow-me/reducer';
import '../google-api/reducer';
import '../invite/reducer';
import '../large-video/reducer';
import '../lobby/reducer';
import '../notifications/reducer';
import '../overlay/reducer';
import '../recent-list/reducer';
import '../recording/reducer';
import '../settings/reducer';
import '../subtitles/reducer';
import '../toolbox/reducer';
import '../transcribing/reducer';
import '../video-layout/reducer';
import '../videosipgw/reducer';
import '../welcome/reducer';

View File

@ -0,0 +1,12 @@
// @flow
import '../authentication/reducer';
import '../mobile/audio-mode/reducer';
import '../mobile/background/reducer';
import '../mobile/call-integration/reducer';
import '../mobile/full-screen/reducer';
import '../mobile/incoming-call/reducer';
import '../mobile/watchos/reducer';
import '../youtube-player/reducer';
import './reducers.any';

View File

@ -0,0 +1,15 @@
// @flow
import '../base/devices/reducer';
import '../e2ee/reducer';
import '../feedback/reducer';
import '../local-recording/reducer';
import '../no-audio-signal/reducer';
import '../noise-detection/reducer';
import '../power-monitor/reducer';
import '../prejoin/reducer';
import '../screenshot-capture/reducer';
import '../shared-video/reducer';
import '../talk-while-muted/reducer';
import './reducers.any';

View File

@ -2,7 +2,7 @@
import type { Dispatch } from 'redux'; import type { Dispatch } from 'redux';
import { appNavigate } from '../app'; import { appNavigate } from '../app/actions';
import { checkIfCanJoin, conferenceLeft } from '../base/conference'; import { checkIfCanJoin, conferenceLeft } from '../base/conference';
import { connectionFailed } from '../base/connection'; import { connectionFailed } from '../base/connection';
import { openDialog } from '../base/dialog'; import { openDialog } from '../base/dialog';

View File

@ -1,6 +1,3 @@
export * from './actions'; export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
export * from './components'; export * from './components';
import './middleware';
import './reducer';

View File

@ -2,7 +2,7 @@
import type { Dispatch } from 'redux'; import type { Dispatch } from 'redux';
import { appNavigate } from '../app'; import { appNavigate } from '../app/actions';
import { import {
CONFERENCE_FAILED, CONFERENCE_FAILED,
CONFERENCE_JOINED, CONFERENCE_JOINED,

View File

@ -2,5 +2,3 @@ export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
export * from './components'; export * from './components';
export * from './functions'; export * from './functions';
import './reducer';

View File

@ -2,5 +2,3 @@
export * from './actions'; export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
import './reducer';

View File

@ -4,5 +4,3 @@ export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
export * from './functions'; export * from './functions';
export { default as ColorSchemeRegistry } from './ColorSchemeRegistry'; export { default as ColorSchemeRegistry } from './ColorSchemeRegistry';
import './reducer';

View File

@ -6,7 +6,7 @@ import {
createStartMutedConfigurationEvent, createStartMutedConfigurationEvent,
sendAnalytics sendAnalytics
} from '../../analytics'; } from '../../analytics';
import { getName } from '../../app'; import { getName } from '../../app/functions';
import { endpointMessageReceived } from '../../subtitles'; import { endpointMessageReceived } from '../../subtitles';
import { JITSI_CONNECTION_CONFERENCE_KEY } from '../connection'; import { JITSI_CONNECTION_CONFERENCE_KEY } from '../connection';
import { JitsiConferenceEvents } from '../lib-jitsi-meet'; import { JitsiConferenceEvents } from '../lib-jitsi-meet';

View File

@ -2,6 +2,3 @@ export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
export * from './constants'; export * from './constants';
export * from './functions'; export * from './functions';
import './middleware';
import './reducer';

View File

@ -2,6 +2,3 @@ export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
export { default as CONFIG_WHITELIST } from './configWhitelist'; export { default as CONFIG_WHITELIST } from './configWhitelist';
export * from './functions'; export * from './functions';
import './middleware';
import './reducer';

View File

@ -3,11 +3,8 @@
import _ from 'lodash'; import _ from 'lodash';
import type { Dispatch } from 'redux'; import type { Dispatch } from 'redux';
import { import { conferenceLeft, conferenceWillLeave } from '../conference/actions';
conferenceLeft, import { getCurrentConference } from '../conference/functions';
conferenceWillLeave,
getCurrentConference
} from '../conference';
import JitsiMeetJS, { JitsiConnectionEvents } from '../lib-jitsi-meet'; import JitsiMeetJS, { JitsiConnectionEvents } from '../lib-jitsi-meet';
import { import {
getBackendSafeRoomName, getBackendSafeRoomName,

View File

@ -4,5 +4,3 @@ export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
export * from './constants'; export * from './constants';
export * from './functions'; export * from './functions';
import './reducer';

View File

@ -1,6 +1,3 @@
export * from './actions'; export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
export * from './functions'; export * from './functions';
import './middleware';
import './reducer';

View File

@ -2,5 +2,3 @@ export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
export * from './components'; export * from './components';
export * from './functions'; export * from './functions';
import './reducer';

View File

@ -2,5 +2,3 @@ export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
export * from './constants'; export * from './constants';
export * from './functions'; export * from './functions';
import './reducer';

View File

@ -1,6 +1,3 @@
export * from './actions'; export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
export * from './functions'; export * from './functions';
import './middleware';
import './reducer';

View File

@ -1,5 +1,2 @@
export * from './actions'; export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
import './middleware';
import './reducer';

View File

@ -1,6 +1,6 @@
// @flow // @flow
import { getDefaultURL } from '../../app'; import { getDefaultURL } from '../../app/functions';
import { APP_WILL_MOUNT } from '../app'; import { APP_WILL_MOUNT } from '../app';
import { SET_ROOM } from '../conference'; import { SET_ROOM } from '../conference';
import { MiddlewareRegistry } from '../redux'; import { MiddlewareRegistry } from '../redux';

View File

@ -1,6 +1,6 @@
// @flow // @flow
import { APP_WILL_MOUNT } from '../app'; import { APP_WILL_MOUNT } from '../app/actionTypes';
import { PersistenceRegistry, ReducerRegistry } from '../redux'; import { PersistenceRegistry, ReducerRegistry } from '../redux';
import { ADD_KNOWN_DOMAINS } from './actionTypes'; import { ADD_KNOWN_DOMAINS } from './actionTypes';

View File

@ -1,3 +0,0 @@
// @flow
import './middleware';

View File

@ -43,7 +43,7 @@ function _updateLastN({ getState }) {
const state = getState(); const state = getState();
const { conference } = state['features/base/conference']; const { conference } = state['features/base/conference'];
const { enabled: audioOnly } = state['features/base/audio-only']; const { enabled: audioOnly } = state['features/base/audio-only'];
const { appState } = state['features/background']; const { appState } = state['features/background'] || {};
const { enabled: filmStripEnabled } = state['features/filmstrip']; const { enabled: filmStripEnabled } = state['features/filmstrip'];
const config = state['features/base/config']; const config = state['features/base/config'];
@ -56,7 +56,7 @@ function _updateLastN({ getState }) {
const defaultLastN = typeof config.channelLastN === 'undefined' ? -1 : config.channelLastN; const defaultLastN = typeof config.channelLastN === 'undefined' ? -1 : config.channelLastN;
let lastN = defaultLastN; let lastN = defaultLastN;
if (appState !== 'active') { if (typeof appState !== 'undefined' && appState !== 'active') {
lastN = 0; lastN = 0;
} else if (audioOnly) { } else if (audioOnly) {
const { screenShares, tileViewEnabled } = state['features/video-layout']; const { screenShares, tileViewEnabled } = state['features/video-layout'];

View File

@ -27,6 +27,3 @@ export const JitsiTrackEvents = JitsiMeetJS.events.track;
export * from './actions'; export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
export * from './functions'; export * from './functions';
import './middleware';
import './reducer';

View File

@ -1,6 +1,3 @@
export * from './actions'; export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
export * from './functions'; export * from './functions';
import './middleware';
import './reducer';

View File

@ -3,6 +3,3 @@ export * from './actionTypes';
export * from './components'; export * from './components';
export * from './constants'; export * from './constants';
export * from './functions'; export * from './functions';
import './middleware';
import './reducer';

View File

@ -1,7 +1,5 @@
// @flow // @flow
import './reducer';
export * from './actions'; export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
export * from './components'; export * from './components';

View File

@ -1,4 +1 @@
export * from './actionTypes'; export * from './actionTypes';
import './middleware';
import './reducer';

View File

@ -3,6 +3,3 @@ export * from './actionTypes';
export * from './components'; export * from './components';
export * from './constants'; export * from './constants';
export * from './functions'; export * from './functions';
import './middleware';
import './reducer';

View File

@ -2,6 +2,3 @@ export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
export * from './components'; export * from './components';
export * from './constants'; export * from './constants';
import './middleware';
import './reducer';

View File

@ -2,6 +2,3 @@ export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
export * from './constants'; export * from './constants';
export * from './functions'; export * from './functions';
import './middleware';
import './reducer';

View File

@ -4,7 +4,7 @@ import { jitsiLocalStorage } from 'js-utils';
import { randomHexString } from 'js-utils/random'; import { randomHexString } from 'js-utils/random';
import _ from 'lodash'; import _ from 'lodash';
import { APP_WILL_MOUNT } from '../app'; import { APP_WILL_MOUNT } from '../app/actionTypes';
import { browser } from '../lib-jitsi-meet'; import { browser } from '../lib-jitsi-meet';
import { PersistenceRegistry, ReducerRegistry } from '../redux'; import { PersistenceRegistry, ReducerRegistry } from '../redux';
import { assignIfDefined } from '../util'; import { assignIfDefined } from '../util';

View File

@ -1,4 +1,4 @@
import { getSdkBundlePath } from '../../app'; import { getSdkBundlePath } from '../../app/functions';
/** /**
* Returns the location of the sounds. On iOS it's the location of the SDK * Returns the location of the sounds. On iOS it's the location of the SDK

View File

@ -1,6 +1,3 @@
export * from './actions'; export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
export * from './components'; export * from './components';
import './middleware';
import './reducer';

View File

@ -1,5 +1,2 @@
export * from './components'; export * from './components';
export * from './functions'; export * from './functions';
import './middleware';
import './reducer';

View File

@ -1,6 +1,3 @@
export * from './actions'; export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
export * from './functions'; export * from './functions';
import './middleware';
import './reducer';

View File

@ -1,2 +0,0 @@
import './middleware';
import './reducer';

View File

@ -1,5 +1,3 @@
export * from './actions'; export * from './actions';
export * from './components'; export * from './components';
export * from './functions'; export * from './functions';
import './reducer';

View File

@ -2,7 +2,7 @@
import { generateRoomWithoutSeparator } from 'js-utils/random'; import { generateRoomWithoutSeparator } from 'js-utils/random';
import type { Dispatch } from 'redux'; import type { Dispatch } from 'redux';
import { getDefaultURL } from '../app'; import { getDefaultURL } from '../app/functions';
import { openDialog } from '../base/dialog'; import { openDialog } from '../base/dialog';
import { refreshCalendar } from './actions'; import { refreshCalendar } from './actions';

View File

@ -7,7 +7,7 @@ import {
createCalendarSelectedEvent, createCalendarSelectedEvent,
sendAnalytics sendAnalytics
} from '../../analytics'; } from '../../analytics';
import { appNavigate } from '../../app'; import { appNavigate } from '../../app/actions';
import { getLocalizedDateFormatter, translate } from '../../base/i18n'; import { getLocalizedDateFormatter, translate } from '../../base/i18n';
import { NavigateSectionList } from '../../base/react'; import { NavigateSectionList } from '../../base/react';
import { connect } from '../../base/redux'; import { connect } from '../../base/redux';

View File

@ -7,7 +7,7 @@ import {
createCalendarSelectedEvent, createCalendarSelectedEvent,
sendAnalytics sendAnalytics
} from '../../analytics'; } from '../../analytics';
import { appNavigate } from '../../app'; import { appNavigate } from '../../app/actions';
import { MeetingsList } from '../../base/react'; import { MeetingsList } from '../../base/react';
import { connect } from '../../base/redux'; import { connect } from '../../base/redux';

View File

@ -3,7 +3,7 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Text, TouchableOpacity, View } from 'react-native'; import { Text, TouchableOpacity, View } from 'react-native';
import { appNavigate } from '../../app'; import { appNavigate } from '../../app/actions';
import { getURLWithoutParamsNormalized } from '../../base/connection'; import { getURLWithoutParamsNormalized } from '../../base/connection';
import { getLocalizedDateFormatter, translate } from '../../base/i18n'; import { getLocalizedDateFormatter, translate } from '../../base/i18n';
import { Icon, IconNotificationJoin } from '../../base/icons'; import { Icon, IconNotificationJoin } from '../../base/icons';

View File

@ -2,6 +2,3 @@ export * from './actions';
export * from './components'; export * from './components';
export * from './constants'; export * from './constants';
export { isCalendarEnabled } from './functions'; export { isCalendarEnabled } from './functions';
import './middleware';
import './reducer';

View File

@ -2,6 +2,3 @@ export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
export * from './components'; export * from './components';
export * from './constants'; export * from './constants';
import './middleware';
import './reducer';

View File

@ -4,7 +4,7 @@ import React from 'react';
import { NativeModules, SafeAreaView, StatusBar } from 'react-native'; import { NativeModules, SafeAreaView, StatusBar } from 'react-native';
import LinearGradient from 'react-native-linear-gradient'; import LinearGradient from 'react-native-linear-gradient';
import { appNavigate } from '../../../app'; import { appNavigate } from '../../../app/actions';
import { PIP_ENABLED, getFeatureFlag } from '../../../base/flags'; import { PIP_ENABLED, getFeatureFlag } from '../../../base/flags';
import { Container, LoadingIndicator, TintedView } from '../../../base/react'; import { Container, LoadingIndicator, TintedView } from '../../../base/react';
import { connect } from '../../../base/redux'; import { connect } from '../../../base/redux';

View File

@ -1,5 +1,4 @@
// @flow // @flow
export * from './actions'; export * from './actions';
export * from './components'; export * from './components';
import './middleware';

View File

@ -1,5 +1,5 @@
// @flow // @flow
import { appNavigate } from '../app'; import { appNavigate } from '../app/actions';
import { import {
CONFERENCE_JOINED, CONFERENCE_JOINED,
KICKED_OUT, KICKED_OUT,

View File

@ -3,5 +3,3 @@
export * from './components'; export * from './components';
export { default as statsEmitter } from './statsEmitter'; export { default as statsEmitter } from './statsEmitter';
import './middleware';

View File

@ -2,7 +2,7 @@
import type { Dispatch } from 'redux'; import type { Dispatch } from 'redux';
import { appNavigate } from '../app'; import { appNavigate } from '../app/actions';
import { OPEN_DESKTOP_APP, OPEN_WEB_APP } from './actionTypes'; import { OPEN_DESKTOP_APP, OPEN_WEB_APP } from './actionTypes';

View File

@ -1,4 +1 @@
export * from './functions'; export * from './functions';
import './middleware';
import './reducer';

View File

@ -11,7 +11,6 @@ import { openDesktopApp } from './functions';
* @param {Store} store - The redux store. * @param {Store} store - The redux store.
* @returns {Function} * @returns {Function}
*/ */
// eslint-disable-next-line no-unused-vars
MiddlewareRegistry.register(store => next => action => { MiddlewareRegistry.register(store => next => action => {
switch (action.type) { switch (action.type) {
case OPEN_DESKTOP_APP: case OPEN_DESKTOP_APP:

View File

@ -2,6 +2,3 @@ export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
export * from './components'; export * from './components';
export * from './functions'; export * from './functions';
import './middleware';
import './reducer';

View File

@ -3,5 +3,3 @@
export * from './actions'; export * from './actions';
export * from './components'; export * from './components';
export * from './functions'; export * from './functions';
import './middleware';

View File

@ -1,4 +1,2 @@
export * from './actions'; export * from './actions';
export * from './functions.any'; export * from './functions.any';
import './reducer';

View File

@ -1,6 +1,3 @@
export * from './actions'; export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
export * from './components'; export * from './components';
import './middleware';
import './reducer';

View File

@ -3,6 +3,3 @@ export * from './actionTypes';
export * from './components'; export * from './components';
export * from './constants'; export * from './constants';
export * from './functions'; export * from './functions';
import './middleware';
import './reducer';

View File

@ -1,2 +0,0 @@
import './middleware';
import './subscriber';

View File

@ -23,6 +23,8 @@ import { appendSuffix } from '../display-name';
import { SUBMIT_FEEDBACK_ERROR, SUBMIT_FEEDBACK_SUCCESS } from '../feedback'; import { SUBMIT_FEEDBACK_ERROR, SUBMIT_FEEDBACK_SUCCESS } from '../feedback';
import { SET_FILMSTRIP_VISIBLE } from '../filmstrip'; import { SET_FILMSTRIP_VISIBLE } from '../filmstrip';
import './subscriber';
declare var APP: Object; declare var APP: Object;
declare var interfaceConfig: Object; declare var interfaceConfig: Object;

View File

@ -1,5 +1,3 @@
export * from './actions'; export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
export * from './components'; export * from './components';
import './reducer';

View File

@ -3,7 +3,3 @@ export * from './actionTypes';
export * from './components'; export * from './components';
export * from './constants'; export * from './constants';
export * from './functions'; export * from './functions';
import './reducer';
import './subscriber';
import './middleware';

View File

@ -13,6 +13,8 @@ import {
import { SET_HORIZONTAL_VIEW_DIMENSIONS, SET_TILE_VIEW_DIMENSIONS } from './actionTypes'; import { SET_HORIZONTAL_VIEW_DIMENSIONS, SET_TILE_VIEW_DIMENSIONS } from './actionTypes';
import { setHorizontalViewDimensions, setTileViewDimensions } from './actions'; import { setHorizontalViewDimensions, setTileViewDimensions } from './actions';
import './subscriber.web';
/** /**
* The middleware of the feature Filmstrip. * The middleware of the feature Filmstrip.
*/ */

View File

@ -1,5 +1 @@
export * from './functions'; export * from './functions';
export * from './middleware';
export * from './subscriber';
import './reducer';

View File

@ -1,6 +1,6 @@
// @flow // @flow
import { CONFERENCE_WILL_JOIN } from '../base/conference'; import { CONFERENCE_WILL_JOIN } from '../base/conference/actionTypes';
import { import {
getParticipantById, getParticipantById,
getPinnedParticipant, getPinnedParticipant,
@ -19,6 +19,8 @@ import { FOLLOW_ME_COMMAND } from './constants';
import { isFollowMeActive } from './functions'; import { isFollowMeActive } from './functions';
import logger from './logger'; import logger from './logger';
import './subscriber';
declare var APP: Object; declare var APP: Object;
/** /**

View File

@ -4,5 +4,3 @@ export * from './actions';
export * from './components'; export * from './components';
export * from './constants'; export * from './constants';
export { default as googleApi } from './googleApi'; export { default as googleApi } from './googleApi';
import './reducer';

View File

@ -1,6 +1,3 @@
export * from './actions'; export * from './actions';
export * from './components'; export * from './components';
export * from './functions'; export * from './functions';
import './reducer';
import './middleware';

View File

@ -1,4 +1,2 @@
export * from './actions'; export * from './actions';
export * from './components'; export * from './components';
import './middleware';

View File

@ -1,6 +1,2 @@
export * from './actions'; export * from './actions';
export * from './components'; export * from './components';
import './middleware';
import './reducer';
import './subscriber';

View File

@ -18,6 +18,8 @@ import {
import { selectParticipant, selectParticipantInLargeVideo } from './actions'; import { selectParticipant, selectParticipantInLargeVideo } from './actions';
import './subscriber';
/** /**
* Middleware that catches actions related to participants and tracks and * Middleware that catches actions related to participants and tracks and
* dispatches an action to select a participant depicted by LargeVideo. * dispatches an action to select a participant depicted by LargeVideo.

View File

@ -2,7 +2,7 @@
import { type Dispatch } from 'redux'; import { type Dispatch } from 'redux';
import { appNavigate, maybeRedirectToWelcomePage } from '../app'; import { appNavigate, maybeRedirectToWelcomePage } from '../app/actions';
import { conferenceWillJoin, getCurrentConference, setPassword } from '../base/conference'; import { conferenceWillJoin, getCurrentConference, setPassword } from '../base/conference';
import { hideDialog, openDialog } from '../base/dialog'; import { hideDialog, openDialog } from '../base/dialog';
import { getLocalParticipant } from '../base/participants'; import { getLocalParticipant } from '../base/participants';

View File

@ -1,6 +1,3 @@
// @flow // @flow
import './middleware';
import './reducer';
export * from './components'; export * from './components';

View File

@ -2,6 +2,3 @@ export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
export * from './components'; export * from './components';
export * from './controller'; export * from './controller';
import './middleware';
import './reducer';

View File

@ -1,14 +1,14 @@
/* @flow */ /* @flow */
import { createShortcutEvent, sendAnalytics } from '../analytics'; import { createShortcutEvent, sendAnalytics } from '../analytics';
import { APP_WILL_UNMOUNT } from '../base/app'; import { APP_WILL_UNMOUNT } from '../base/app/actionTypes';
import { CONFERENCE_JOINED } from '../base/conference'; import { CONFERENCE_JOINED } from '../base/conference/actionTypes';
import { toggleDialog } from '../base/dialog'; import { toggleDialog } from '../base/dialog/actions';
import { i18next } from '../base/i18n'; import { i18next } from '../base/i18n';
import { SET_AUDIO_MUTED } from '../base/media'; import { SET_AUDIO_MUTED } from '../base/media/actionTypes';
import { MiddlewareRegistry } from '../base/redux'; import { MiddlewareRegistry } from '../base/redux';
import { SETTINGS_UPDATED } from '../base/settings/actionTypes'; import { SETTINGS_UPDATED } from '../base/settings/actionTypes';
import { showNotification } from '../notifications'; import { showNotification } from '../notifications/actions';
import { localRecordingEngaged, localRecordingUnengaged } from './actions'; import { localRecordingEngaged, localRecordingUnengaged } from './actions';
import { LocalRecordingInfoDialog } from './components'; import { LocalRecordingInfoDialog } from './components';

View File

@ -1,4 +1 @@
export * from './components'; export * from './components';
import './middleware';
import './reducer';

View File

@ -1,5 +1,3 @@
// @flow // @flow
export { default as BackButtonRegistry } from './BackButtonRegistry'; export { default as BackButtonRegistry } from './BackButtonRegistry';
import './middleware';

View File

@ -1,5 +1,2 @@
export * from './actions'; export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
import './middleware';
import './reducer';

View File

@ -1,6 +1,6 @@
import { NativeModules, NativeEventEmitter } from 'react-native'; import { NativeModules, NativeEventEmitter } from 'react-native';
import { getName } from '../../app'; import { getName } from '../../app/functions';
/** /**
* Thin wrapper around Apple's CallKit functionality. * Thin wrapper around Apple's CallKit functionality.

View File

@ -1,2 +0,0 @@
import './middleware';
import './reducer';

View File

@ -4,7 +4,7 @@ import { Alert, NativeModules, Platform } from 'react-native';
import uuid from 'uuid'; import uuid from 'uuid';
import { createTrackMutedEvent, sendAnalytics } from '../../analytics'; import { createTrackMutedEvent, sendAnalytics } from '../../analytics';
import { appNavigate } from '../../app'; import { appNavigate } from '../../app/actions';
import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../../base/app'; import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../../base/app';
import { SET_AUDIO_ONLY } from '../../base/audio-only'; import { SET_AUDIO_ONLY } from '../../base/audio-only';
import { import {

View File

@ -1,3 +1 @@
export * from './functions'; export * from './functions';
import './middleware';

View File

@ -1,2 +0,0 @@
import './middleware';
import './reducer';

View File

@ -1,4 +1 @@
export * from './components'; export * from './components';
import './middleware';
import './reducer';

View File

@ -1,3 +1 @@
export * from './functions'; export * from './functions';
import './middleware';

View File

@ -1 +0,0 @@
import './middleware';

View File

@ -1 +0,0 @@
import './middleware';

View File

@ -1,2 +0,0 @@
import './middleware';
import './reducer';

View File

@ -3,7 +3,7 @@
import { Platform } from 'react-native'; import { Platform } from 'react-native';
import * as watch from 'react-native-watch-connectivity'; import * as watch from 'react-native-watch-connectivity';
import { appNavigate } from '../../app'; import { appNavigate } from '../../app/actions';
import { APP_WILL_MOUNT } from '../../base/app'; import { APP_WILL_MOUNT } from '../../base/app';
import { CONFERENCE_JOINED } from '../../base/conference'; import { CONFERENCE_JOINED } from '../../base/conference';
import { getCurrentConferenceUrl } from '../../base/connection'; import { getCurrentConferenceUrl } from '../../base/connection';

View File

@ -1,4 +0,0 @@
// @flow
import './middleware';
import './reducer';

Some files were not shown because too many files have changed in this diff Show More