diff --git a/Makefile b/Makefile index 871d1b758..4cbbdfea7 100644 --- a/Makefile +++ b/Makefile @@ -82,7 +82,7 @@ deploy-local: .NOTPARALLEL: 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: mkdir -p source_package/jitsi-meet/css && \ diff --git a/conference.js b/conference.js index 5e1dcd52c..4e266bdc3 100644 --- a/conference.js +++ b/conference.js @@ -22,7 +22,7 @@ import { maybeRedirectToWelcomePage, redirectToStaticPage, reloadWithStoredParams -} from './react/features/app'; +} from './react/features/app/actions'; import { AVATAR_ID_COMMAND, AVATAR_URL_COMMAND, diff --git a/connection.js b/connection.js index 4652060aa..8c92bfb97 100644 --- a/connection.js +++ b/connection.js @@ -7,7 +7,7 @@ import AuthHandler from './modules/UI/authentication/AuthHandler'; import { connectionEstablished, connectionFailed -} from './react/features/base/connection'; +} from './react/features/base/connection/actions'; import { isFatalJitsiConnectionError, JitsiConnectionErrors, diff --git a/modules/UI/authentication/LoginDialog.js b/modules/UI/authentication/LoginDialog.js index 9f56aaf54..fe39badbc 100644 --- a/modules/UI/authentication/LoginDialog.js +++ b/modules/UI/authentication/LoginDialog.js @@ -1,6 +1,6 @@ /* global $, APP, config */ -import { toJid } from '../../../react/features/base/connection'; +import { toJid } from '../../../react/features/base/connection/functions'; import { JitsiConnectionErrors } from '../../../react/features/base/lib-jitsi-meet'; diff --git a/react/features/analytics/index.js b/react/features/analytics/index.js index ede2addc7..d45cd39bd 100644 --- a/react/features/analytics/index.js +++ b/react/features/analytics/index.js @@ -1,5 +1,2 @@ export * from './AnalyticsEvents'; export * from './functions'; - -import './middleware'; -import './reducer'; diff --git a/react/features/app/components/AbstractApp.js b/react/features/app/components/AbstractApp.js index cd5bec43b..2e42dce49 100644 --- a/react/features/app/components/AbstractApp.js +++ b/react/features/app/components/AbstractApp.js @@ -3,12 +3,8 @@ import React, { Fragment } from 'react'; import { BaseApp } from '../../base/app'; -import '../../base/lastn'; // Register lastN middleware import { toURLString } from '../../base/util'; -import '../../follow-me'; import { OverlayContainer } from '../../overlay'; -import '../../lobby'; // Import lobby function -import '../../rejoin'; // Enable rejoin analytics import { appNavigate } from '../actions'; import { getDefaultURL } from '../functions'; diff --git a/react/features/app/components/App.native.js b/react/features/app/components/App.native.js index 54aa783cc..f0343253e 100644 --- a/react/features/app/components/App.native.js +++ b/react/features/app/components/App.native.js @@ -2,32 +2,21 @@ import React from 'react'; -import '../../analytics'; -import '../../authentication'; import { setColorScheme } from '../../base/color-scheme'; import { DialogContainer } from '../../base/dialog'; import { CALL_INTEGRATION_ENABLED, updateFlags } from '../../base/flags'; -import '../../base/jwt'; import { Platform } from '../../base/react'; import { DimensionsDetector, clientResized } from '../../base/responsive-ui'; 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 { AbstractApp } from './AbstractApp'; import type { Props as AbstractAppProps } from './AbstractApp'; +// Register middlewares and reducers. +import '../middlewares'; +import '../reducers'; + declare var __DEV__; /** diff --git a/react/features/app/components/App.web.js b/react/features/app/components/App.web.js index dad24fb10..e8e029ae9 100644 --- a/react/features/app/components/App.web.js +++ b/react/features/app/components/App.web.js @@ -5,19 +5,13 @@ import React from 'react'; import { DialogContainer } from '../../base/dialog'; 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'; +// Register middlewares and reducers. +import '../middlewares'; +import '../reducers'; + /** * Root app {@code Component} on Web/React. * diff --git a/react/features/app/index.js b/react/features/app/index.js deleted file mode 100644 index 46a00713e..000000000 --- a/react/features/app/index.js +++ /dev/null @@ -1,7 +0,0 @@ -// @flow - -export * from './actions'; -export * from './components'; -export * from './functions'; - -import './middleware'; diff --git a/react/features/app/middlewares.any.js b/react/features/app/middlewares.any.js new file mode 100644 index 000000000..019cae38e --- /dev/null +++ b/react/features/app/middlewares.any.js @@ -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'; diff --git a/react/features/app/middlewares.native.js b/react/features/app/middlewares.native.js new file mode 100644 index 000000000..23d969ec2 --- /dev/null +++ b/react/features/app/middlewares.native.js @@ -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'; diff --git a/react/features/app/middlewares.web.js b/react/features/app/middlewares.web.js new file mode 100644 index 000000000..c21180d8d --- /dev/null +++ b/react/features/app/middlewares.web.js @@ -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'; diff --git a/react/features/app/reducers.any.js b/react/features/app/reducers.any.js new file mode 100644 index 000000000..0723eb77e --- /dev/null +++ b/react/features/app/reducers.any.js @@ -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'; diff --git a/react/features/app/reducers.native.js b/react/features/app/reducers.native.js new file mode 100644 index 000000000..8adaebd5b --- /dev/null +++ b/react/features/app/reducers.native.js @@ -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'; diff --git a/react/features/app/reducers.web.js b/react/features/app/reducers.web.js new file mode 100644 index 000000000..28c988f2d --- /dev/null +++ b/react/features/app/reducers.web.js @@ -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'; diff --git a/react/features/authentication/actions.js b/react/features/authentication/actions.js index 51e5eaed4..2183fa3e4 100644 --- a/react/features/authentication/actions.js +++ b/react/features/authentication/actions.js @@ -2,7 +2,7 @@ import type { Dispatch } from 'redux'; -import { appNavigate } from '../app'; +import { appNavigate } from '../app/actions'; import { checkIfCanJoin, conferenceLeft } from '../base/conference'; import { connectionFailed } from '../base/connection'; import { openDialog } from '../base/dialog'; diff --git a/react/features/authentication/index.js b/react/features/authentication/index.js index a29aa08e0..803dacd06 100644 --- a/react/features/authentication/index.js +++ b/react/features/authentication/index.js @@ -1,6 +1,3 @@ export * from './actions'; export * from './actionTypes'; export * from './components'; - -import './middleware'; -import './reducer'; diff --git a/react/features/authentication/middleware.js b/react/features/authentication/middleware.js index 29f36212f..0f0cb3e7b 100644 --- a/react/features/authentication/middleware.js +++ b/react/features/authentication/middleware.js @@ -2,7 +2,7 @@ import type { Dispatch } from 'redux'; -import { appNavigate } from '../app'; +import { appNavigate } from '../app/actions'; import { CONFERENCE_FAILED, CONFERENCE_JOINED, diff --git a/react/features/base/app/index.js b/react/features/base/app/index.js index 5d564613e..b845e8859 100644 --- a/react/features/base/app/index.js +++ b/react/features/base/app/index.js @@ -2,5 +2,3 @@ export * from './actions'; export * from './actionTypes'; export * from './components'; export * from './functions'; - -import './reducer'; diff --git a/react/features/base/audio-only/index.js b/react/features/base/audio-only/index.js index f6aa63cd5..3d915f1aa 100644 --- a/react/features/base/audio-only/index.js +++ b/react/features/base/audio-only/index.js @@ -2,5 +2,3 @@ export * from './actions'; export * from './actionTypes'; - -import './reducer'; diff --git a/react/features/base/color-scheme/index.js b/react/features/base/color-scheme/index.js index fdc97c28a..bdb92c87f 100644 --- a/react/features/base/color-scheme/index.js +++ b/react/features/base/color-scheme/index.js @@ -4,5 +4,3 @@ export * from './actions'; export * from './actionTypes'; export * from './functions'; export { default as ColorSchemeRegistry } from './ColorSchemeRegistry'; - -import './reducer'; diff --git a/react/features/base/conference/actions.js b/react/features/base/conference/actions.js index edfae3ee9..9043aa911 100644 --- a/react/features/base/conference/actions.js +++ b/react/features/base/conference/actions.js @@ -6,7 +6,7 @@ import { createStartMutedConfigurationEvent, sendAnalytics } from '../../analytics'; -import { getName } from '../../app'; +import { getName } from '../../app/functions'; import { endpointMessageReceived } from '../../subtitles'; import { JITSI_CONNECTION_CONFERENCE_KEY } from '../connection'; import { JitsiConferenceEvents } from '../lib-jitsi-meet'; diff --git a/react/features/base/conference/index.js b/react/features/base/conference/index.js index 39f1ee456..a60a814b1 100644 --- a/react/features/base/conference/index.js +++ b/react/features/base/conference/index.js @@ -2,6 +2,3 @@ export * from './actions'; export * from './actionTypes'; export * from './constants'; export * from './functions'; - -import './middleware'; -import './reducer'; diff --git a/react/features/base/config/index.js b/react/features/base/config/index.js index 4057a3ed6..9fbf5c252 100644 --- a/react/features/base/config/index.js +++ b/react/features/base/config/index.js @@ -2,6 +2,3 @@ export * from './actions'; export * from './actionTypes'; export { default as CONFIG_WHITELIST } from './configWhitelist'; export * from './functions'; - -import './middleware'; -import './reducer'; diff --git a/react/features/base/connection/actions.native.js b/react/features/base/connection/actions.native.js index 1aceb3f31..8fc45d93b 100644 --- a/react/features/base/connection/actions.native.js +++ b/react/features/base/connection/actions.native.js @@ -3,11 +3,8 @@ import _ from 'lodash'; import type { Dispatch } from 'redux'; -import { - conferenceLeft, - conferenceWillLeave, - getCurrentConference -} from '../conference'; +import { conferenceLeft, conferenceWillLeave } from '../conference/actions'; +import { getCurrentConference } from '../conference/functions'; import JitsiMeetJS, { JitsiConnectionEvents } from '../lib-jitsi-meet'; import { getBackendSafeRoomName, diff --git a/react/features/base/connection/index.js b/react/features/base/connection/index.js index 125852add..854866912 100644 --- a/react/features/base/connection/index.js +++ b/react/features/base/connection/index.js @@ -4,5 +4,3 @@ export * from './actions'; export * from './actionTypes'; export * from './constants'; export * from './functions'; - -import './reducer'; diff --git a/react/features/base/devices/index.js b/react/features/base/devices/index.js index 969667b3a..08fe9014b 100644 --- a/react/features/base/devices/index.js +++ b/react/features/base/devices/index.js @@ -1,6 +1,3 @@ export * from './actions'; export * from './actionTypes'; export * from './functions'; - -import './middleware'; -import './reducer'; diff --git a/react/features/base/dialog/index.js b/react/features/base/dialog/index.js index 5d564613e..b845e8859 100644 --- a/react/features/base/dialog/index.js +++ b/react/features/base/dialog/index.js @@ -2,5 +2,3 @@ export * from './actions'; export * from './actionTypes'; export * from './components'; export * from './functions'; - -import './reducer'; diff --git a/react/features/base/flags/index.js b/react/features/base/flags/index.js index daf82271a..a60a814b1 100644 --- a/react/features/base/flags/index.js +++ b/react/features/base/flags/index.js @@ -2,5 +2,3 @@ export * from './actions'; export * from './actionTypes'; export * from './constants'; export * from './functions'; - -import './reducer'; diff --git a/react/features/base/jwt/index.js b/react/features/base/jwt/index.js index 969667b3a..08fe9014b 100644 --- a/react/features/base/jwt/index.js +++ b/react/features/base/jwt/index.js @@ -1,6 +1,3 @@ export * from './actions'; export * from './actionTypes'; export * from './functions'; - -import './middleware'; -import './reducer'; diff --git a/react/features/base/known-domains/index.js b/react/features/base/known-domains/index.js index f3a2aac65..e40f04336 100644 --- a/react/features/base/known-domains/index.js +++ b/react/features/base/known-domains/index.js @@ -1,5 +1,2 @@ export * from './actions'; export * from './actionTypes'; - -import './middleware'; -import './reducer'; diff --git a/react/features/base/known-domains/middleware.js b/react/features/base/known-domains/middleware.js index dc17be605..e04cca9ac 100644 --- a/react/features/base/known-domains/middleware.js +++ b/react/features/base/known-domains/middleware.js @@ -1,6 +1,6 @@ // @flow -import { getDefaultURL } from '../../app'; +import { getDefaultURL } from '../../app/functions'; import { APP_WILL_MOUNT } from '../app'; import { SET_ROOM } from '../conference'; import { MiddlewareRegistry } from '../redux'; diff --git a/react/features/base/known-domains/reducer.js b/react/features/base/known-domains/reducer.js index 13d4786c4..9604bf859 100644 --- a/react/features/base/known-domains/reducer.js +++ b/react/features/base/known-domains/reducer.js @@ -1,6 +1,6 @@ // @flow -import { APP_WILL_MOUNT } from '../app'; +import { APP_WILL_MOUNT } from '../app/actionTypes'; import { PersistenceRegistry, ReducerRegistry } from '../redux'; import { ADD_KNOWN_DOMAINS } from './actionTypes'; diff --git a/react/features/base/lastn/index.js b/react/features/base/lastn/index.js deleted file mode 100644 index ae4bc5164..000000000 --- a/react/features/base/lastn/index.js +++ /dev/null @@ -1,3 +0,0 @@ -// @flow - -import './middleware'; diff --git a/react/features/base/lastn/middleware.js b/react/features/base/lastn/middleware.js index ea00ece5c..73cb53d90 100644 --- a/react/features/base/lastn/middleware.js +++ b/react/features/base/lastn/middleware.js @@ -43,7 +43,7 @@ function _updateLastN({ getState }) { const state = getState(); const { conference } = state['features/base/conference']; 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 config = state['features/base/config']; @@ -56,7 +56,7 @@ function _updateLastN({ getState }) { const defaultLastN = typeof config.channelLastN === 'undefined' ? -1 : config.channelLastN; let lastN = defaultLastN; - if (appState !== 'active') { + if (typeof appState !== 'undefined' && appState !== 'active') { lastN = 0; } else if (audioOnly) { const { screenShares, tileViewEnabled } = state['features/video-layout']; diff --git a/react/features/base/lib-jitsi-meet/index.js b/react/features/base/lib-jitsi-meet/index.js index 5d46e6557..309c192c3 100644 --- a/react/features/base/lib-jitsi-meet/index.js +++ b/react/features/base/lib-jitsi-meet/index.js @@ -27,6 +27,3 @@ export const JitsiTrackEvents = JitsiMeetJS.events.track; export * from './actions'; export * from './actionTypes'; export * from './functions'; - -import './middleware'; -import './reducer'; diff --git a/react/features/base/logging/index.js b/react/features/base/logging/index.js index 969667b3a..08fe9014b 100644 --- a/react/features/base/logging/index.js +++ b/react/features/base/logging/index.js @@ -1,6 +1,3 @@ export * from './actions'; export * from './actionTypes'; export * from './functions'; - -import './middleware'; -import './reducer'; diff --git a/react/features/base/media/index.js b/react/features/base/media/index.js index 0a8f4ad7b..b826983c4 100644 --- a/react/features/base/media/index.js +++ b/react/features/base/media/index.js @@ -3,6 +3,3 @@ export * from './actionTypes'; export * from './components'; export * from './constants'; export * from './functions'; - -import './middleware'; -import './reducer'; diff --git a/react/features/base/modal/index.js b/react/features/base/modal/index.js index 04b78b685..7fdd75c29 100644 --- a/react/features/base/modal/index.js +++ b/react/features/base/modal/index.js @@ -1,7 +1,5 @@ // @flow -import './reducer'; - export * from './actions'; export * from './actionTypes'; export * from './components'; diff --git a/react/features/base/net-info/index.js b/react/features/base/net-info/index.js index 79da85d3d..3eb256deb 100644 --- a/react/features/base/net-info/index.js +++ b/react/features/base/net-info/index.js @@ -1,4 +1 @@ export * from './actionTypes'; - -import './middleware'; -import './reducer'; diff --git a/react/features/base/participants/index.js b/react/features/base/participants/index.js index 0a8f4ad7b..b826983c4 100644 --- a/react/features/base/participants/index.js +++ b/react/features/base/participants/index.js @@ -3,6 +3,3 @@ export * from './actionTypes'; export * from './components'; export * from './constants'; export * from './functions'; - -import './middleware'; -import './reducer'; diff --git a/react/features/base/responsive-ui/index.js b/react/features/base/responsive-ui/index.js index 2bf260236..291539e5c 100644 --- a/react/features/base/responsive-ui/index.js +++ b/react/features/base/responsive-ui/index.js @@ -2,6 +2,3 @@ export * from './actions'; export * from './actionTypes'; export * from './components'; export * from './constants'; - -import './middleware'; -import './reducer'; diff --git a/react/features/base/settings/index.js b/react/features/base/settings/index.js index 39f1ee456..a60a814b1 100644 --- a/react/features/base/settings/index.js +++ b/react/features/base/settings/index.js @@ -2,6 +2,3 @@ export * from './actions'; export * from './actionTypes'; export * from './constants'; export * from './functions'; - -import './middleware'; -import './reducer'; diff --git a/react/features/base/settings/reducer.js b/react/features/base/settings/reducer.js index 14a667cd9..9e81470e5 100644 --- a/react/features/base/settings/reducer.js +++ b/react/features/base/settings/reducer.js @@ -4,7 +4,7 @@ import { jitsiLocalStorage } from 'js-utils'; import { randomHexString } from 'js-utils/random'; import _ from 'lodash'; -import { APP_WILL_MOUNT } from '../app'; +import { APP_WILL_MOUNT } from '../app/actionTypes'; import { browser } from '../lib-jitsi-meet'; import { PersistenceRegistry, ReducerRegistry } from '../redux'; import { assignIfDefined } from '../util'; diff --git a/react/features/base/sounds/functions.ios.js b/react/features/base/sounds/functions.ios.js index bfdb5037e..d086d82fb 100644 --- a/react/features/base/sounds/functions.ios.js +++ b/react/features/base/sounds/functions.ios.js @@ -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 diff --git a/react/features/base/sounds/index.js b/react/features/base/sounds/index.js index a29aa08e0..803dacd06 100644 --- a/react/features/base/sounds/index.js +++ b/react/features/base/sounds/index.js @@ -1,6 +1,3 @@ export * from './actions'; export * from './actionTypes'; export * from './components'; - -import './middleware'; -import './reducer'; diff --git a/react/features/base/testing/index.js b/react/features/base/testing/index.js index 65787823f..8b45add51 100644 --- a/react/features/base/testing/index.js +++ b/react/features/base/testing/index.js @@ -1,5 +1,2 @@ export * from './components'; export * from './functions'; - -import './middleware'; -import './reducer'; diff --git a/react/features/base/tracks/index.js b/react/features/base/tracks/index.js index 969667b3a..08fe9014b 100644 --- a/react/features/base/tracks/index.js +++ b/react/features/base/tracks/index.js @@ -1,6 +1,3 @@ export * from './actions'; export * from './actionTypes'; export * from './functions'; - -import './middleware'; -import './reducer'; diff --git a/react/features/base/user-interaction/index.js b/react/features/base/user-interaction/index.js deleted file mode 100644 index 200d25492..000000000 --- a/react/features/base/user-interaction/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import './middleware'; -import './reducer'; diff --git a/react/features/blur/index.js b/react/features/blur/index.js index 61438458c..cc25e46aa 100644 --- a/react/features/blur/index.js +++ b/react/features/blur/index.js @@ -1,5 +1,3 @@ export * from './actions'; export * from './components'; export * from './functions'; - -import './reducer'; diff --git a/react/features/calendar-sync/actions.native.js b/react/features/calendar-sync/actions.native.js index c68a08e4c..344a8d4ec 100644 --- a/react/features/calendar-sync/actions.native.js +++ b/react/features/calendar-sync/actions.native.js @@ -2,7 +2,7 @@ import { generateRoomWithoutSeparator } from 'js-utils/random'; import type { Dispatch } from 'redux'; -import { getDefaultURL } from '../app'; +import { getDefaultURL } from '../app/functions'; import { openDialog } from '../base/dialog'; import { refreshCalendar } from './actions'; diff --git a/react/features/calendar-sync/components/CalendarListContent.native.js b/react/features/calendar-sync/components/CalendarListContent.native.js index e6e2d7990..c2c791ee6 100644 --- a/react/features/calendar-sync/components/CalendarListContent.native.js +++ b/react/features/calendar-sync/components/CalendarListContent.native.js @@ -7,7 +7,7 @@ import { createCalendarSelectedEvent, sendAnalytics } from '../../analytics'; -import { appNavigate } from '../../app'; +import { appNavigate } from '../../app/actions'; import { getLocalizedDateFormatter, translate } from '../../base/i18n'; import { NavigateSectionList } from '../../base/react'; import { connect } from '../../base/redux'; diff --git a/react/features/calendar-sync/components/CalendarListContent.web.js b/react/features/calendar-sync/components/CalendarListContent.web.js index 646b42e94..898a950f4 100644 --- a/react/features/calendar-sync/components/CalendarListContent.web.js +++ b/react/features/calendar-sync/components/CalendarListContent.web.js @@ -7,7 +7,7 @@ import { createCalendarSelectedEvent, sendAnalytics } from '../../analytics'; -import { appNavigate } from '../../app'; +import { appNavigate } from '../../app/actions'; import { MeetingsList } from '../../base/react'; import { connect } from '../../base/redux'; diff --git a/react/features/calendar-sync/components/ConferenceNotification.native.js b/react/features/calendar-sync/components/ConferenceNotification.native.js index e9cd4ae9e..2596a4984 100644 --- a/react/features/calendar-sync/components/ConferenceNotification.native.js +++ b/react/features/calendar-sync/components/ConferenceNotification.native.js @@ -3,7 +3,7 @@ import React, { Component } from 'react'; import { Text, TouchableOpacity, View } from 'react-native'; -import { appNavigate } from '../../app'; +import { appNavigate } from '../../app/actions'; import { getURLWithoutParamsNormalized } from '../../base/connection'; import { getLocalizedDateFormatter, translate } from '../../base/i18n'; import { Icon, IconNotificationJoin } from '../../base/icons'; diff --git a/react/features/calendar-sync/index.js b/react/features/calendar-sync/index.js index 2ab7a37f6..5d78a5f0d 100644 --- a/react/features/calendar-sync/index.js +++ b/react/features/calendar-sync/index.js @@ -2,6 +2,3 @@ export * from './actions'; export * from './components'; export * from './constants'; export { isCalendarEnabled } from './functions'; - -import './middleware'; -import './reducer'; diff --git a/react/features/chat/index.js b/react/features/chat/index.js index 2bf260236..291539e5c 100644 --- a/react/features/chat/index.js +++ b/react/features/chat/index.js @@ -2,6 +2,3 @@ export * from './actions'; export * from './actionTypes'; export * from './components'; export * from './constants'; - -import './middleware'; -import './reducer'; diff --git a/react/features/conference/components/native/Conference.js b/react/features/conference/components/native/Conference.js index e647555d5..b3cd5984f 100644 --- a/react/features/conference/components/native/Conference.js +++ b/react/features/conference/components/native/Conference.js @@ -4,7 +4,7 @@ import React from 'react'; import { NativeModules, SafeAreaView, StatusBar } from 'react-native'; import LinearGradient from 'react-native-linear-gradient'; -import { appNavigate } from '../../../app'; +import { appNavigate } from '../../../app/actions'; import { PIP_ENABLED, getFeatureFlag } from '../../../base/flags'; import { Container, LoadingIndicator, TintedView } from '../../../base/react'; import { connect } from '../../../base/redux'; diff --git a/react/features/conference/index.js b/react/features/conference/index.js index 01943cd7f..7cd20acdf 100644 --- a/react/features/conference/index.js +++ b/react/features/conference/index.js @@ -1,5 +1,4 @@ // @flow + export * from './actions'; export * from './components'; - -import './middleware'; diff --git a/react/features/conference/middleware.js b/react/features/conference/middleware.js index b5b5b7dab..cf8fcf42f 100644 --- a/react/features/conference/middleware.js +++ b/react/features/conference/middleware.js @@ -1,5 +1,5 @@ // @flow -import { appNavigate } from '../app'; +import { appNavigate } from '../app/actions'; import { CONFERENCE_JOINED, KICKED_OUT, diff --git a/react/features/connection-indicator/index.js b/react/features/connection-indicator/index.js index 71c314d9d..d309bedc1 100644 --- a/react/features/connection-indicator/index.js +++ b/react/features/connection-indicator/index.js @@ -3,5 +3,3 @@ export * from './components'; export { default as statsEmitter } from './statsEmitter'; - -import './middleware'; diff --git a/react/features/deep-linking/actions.js b/react/features/deep-linking/actions.js index 5dc4c0fa4..54f5f249b 100644 --- a/react/features/deep-linking/actions.js +++ b/react/features/deep-linking/actions.js @@ -2,7 +2,7 @@ import type { Dispatch } from 'redux'; -import { appNavigate } from '../app'; +import { appNavigate } from '../app/actions'; import { OPEN_DESKTOP_APP, OPEN_WEB_APP } from './actionTypes'; diff --git a/react/features/deep-linking/index.js b/react/features/deep-linking/index.js index c19d5eb7b..484b71595 100644 --- a/react/features/deep-linking/index.js +++ b/react/features/deep-linking/index.js @@ -1,4 +1 @@ export * from './functions'; - -import './middleware'; -import './reducer'; diff --git a/react/features/deep-linking/middleware.js b/react/features/deep-linking/middleware.js index 6e4111c7f..814436c07 100644 --- a/react/features/deep-linking/middleware.js +++ b/react/features/deep-linking/middleware.js @@ -11,7 +11,6 @@ import { openDesktopApp } from './functions'; * @param {Store} store - The redux store. * @returns {Function} */ -// eslint-disable-next-line no-unused-vars MiddlewareRegistry.register(store => next => action => { switch (action.type) { case OPEN_DESKTOP_APP: diff --git a/react/features/device-selection/index.js b/react/features/device-selection/index.js index 44000a1a7..b845e8859 100644 --- a/react/features/device-selection/index.js +++ b/react/features/device-selection/index.js @@ -2,6 +2,3 @@ export * from './actions'; export * from './actionTypes'; export * from './components'; export * from './functions'; - -import './middleware'; -import './reducer'; diff --git a/react/features/display-name/index.js b/react/features/display-name/index.js index 46a00713e..c13d3e017 100644 --- a/react/features/display-name/index.js +++ b/react/features/display-name/index.js @@ -3,5 +3,3 @@ export * from './actions'; export * from './components'; export * from './functions'; - -import './middleware'; diff --git a/react/features/dropbox/index.js b/react/features/dropbox/index.js index 274d33137..b78079182 100644 --- a/react/features/dropbox/index.js +++ b/react/features/dropbox/index.js @@ -1,4 +1,2 @@ export * from './actions'; export * from './functions.any'; - -import './reducer'; diff --git a/react/features/e2ee/index.js b/react/features/e2ee/index.js index a29aa08e0..803dacd06 100644 --- a/react/features/e2ee/index.js +++ b/react/features/e2ee/index.js @@ -1,6 +1,3 @@ export * from './actions'; export * from './actionTypes'; export * from './components'; - -import './middleware'; -import './reducer'; diff --git a/react/features/etherpad/index.js b/react/features/etherpad/index.js index 0a8f4ad7b..b826983c4 100644 --- a/react/features/etherpad/index.js +++ b/react/features/etherpad/index.js @@ -3,6 +3,3 @@ export * from './actionTypes'; export * from './components'; export * from './constants'; export * from './functions'; - -import './middleware'; -import './reducer'; diff --git a/react/features/external-api/index.js b/react/features/external-api/index.js deleted file mode 100644 index eec6b85ef..000000000 --- a/react/features/external-api/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import './middleware'; -import './subscriber'; diff --git a/react/features/external-api/middleware.js b/react/features/external-api/middleware.js index a9d41ea4b..bfd45e433 100644 --- a/react/features/external-api/middleware.js +++ b/react/features/external-api/middleware.js @@ -23,6 +23,8 @@ import { appendSuffix } from '../display-name'; import { SUBMIT_FEEDBACK_ERROR, SUBMIT_FEEDBACK_SUCCESS } from '../feedback'; import { SET_FILMSTRIP_VISIBLE } from '../filmstrip'; +import './subscriber'; + declare var APP: Object; declare var interfaceConfig: Object; diff --git a/react/features/feedback/index.js b/react/features/feedback/index.js index b2e9c09f6..803dacd06 100644 --- a/react/features/feedback/index.js +++ b/react/features/feedback/index.js @@ -1,5 +1,3 @@ export * from './actions'; export * from './actionTypes'; export * from './components'; - -import './reducer'; diff --git a/react/features/filmstrip/index.js b/react/features/filmstrip/index.js index 7689c0d79..b826983c4 100644 --- a/react/features/filmstrip/index.js +++ b/react/features/filmstrip/index.js @@ -3,7 +3,3 @@ export * from './actionTypes'; export * from './components'; export * from './constants'; export * from './functions'; - -import './reducer'; -import './subscriber'; -import './middleware'; diff --git a/react/features/filmstrip/middleware.web.js b/react/features/filmstrip/middleware.web.js index 48d2d7914..6ec99b69c 100644 --- a/react/features/filmstrip/middleware.web.js +++ b/react/features/filmstrip/middleware.web.js @@ -13,6 +13,8 @@ import { import { SET_HORIZONTAL_VIEW_DIMENSIONS, SET_TILE_VIEW_DIMENSIONS } from './actionTypes'; import { setHorizontalViewDimensions, setTileViewDimensions } from './actions'; +import './subscriber.web'; + /** * The middleware of the feature Filmstrip. */ diff --git a/react/features/filmstrip/subscriber.native.js b/react/features/filmstrip/subscriber.native.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/react/features/follow-me/index.js b/react/features/follow-me/index.js index 024c757ad..484b71595 100644 --- a/react/features/follow-me/index.js +++ b/react/features/follow-me/index.js @@ -1,5 +1 @@ export * from './functions'; -export * from './middleware'; -export * from './subscriber'; - -import './reducer'; diff --git a/react/features/follow-me/middleware.js b/react/features/follow-me/middleware.js index 731b528eb..f65f37a64 100644 --- a/react/features/follow-me/middleware.js +++ b/react/features/follow-me/middleware.js @@ -1,6 +1,6 @@ // @flow -import { CONFERENCE_WILL_JOIN } from '../base/conference'; +import { CONFERENCE_WILL_JOIN } from '../base/conference/actionTypes'; import { getParticipantById, getPinnedParticipant, @@ -19,6 +19,8 @@ import { FOLLOW_ME_COMMAND } from './constants'; import { isFollowMeActive } from './functions'; import logger from './logger'; +import './subscriber'; + declare var APP: Object; /** diff --git a/react/features/google-api/index.js b/react/features/google-api/index.js index 085a37171..4ab740781 100644 --- a/react/features/google-api/index.js +++ b/react/features/google-api/index.js @@ -4,5 +4,3 @@ export * from './actions'; export * from './components'; export * from './constants'; export { default as googleApi } from './googleApi'; - -import './reducer'; diff --git a/react/features/invite/index.js b/react/features/invite/index.js index 48450b4e0..cc25e46aa 100644 --- a/react/features/invite/index.js +++ b/react/features/invite/index.js @@ -1,6 +1,3 @@ export * from './actions'; export * from './components'; export * from './functions'; - -import './reducer'; -import './middleware'; diff --git a/react/features/keyboard-shortcuts/index.js b/react/features/keyboard-shortcuts/index.js index a640fd3bf..3c46ed49d 100644 --- a/react/features/keyboard-shortcuts/index.js +++ b/react/features/keyboard-shortcuts/index.js @@ -1,4 +1,2 @@ export * from './actions'; export * from './components'; - -import './middleware'; diff --git a/react/features/large-video/index.js b/react/features/large-video/index.js index 12269a10f..3c46ed49d 100644 --- a/react/features/large-video/index.js +++ b/react/features/large-video/index.js @@ -1,6 +1,2 @@ export * from './actions'; export * from './components'; - -import './middleware'; -import './reducer'; -import './subscriber'; diff --git a/react/features/large-video/middleware.js b/react/features/large-video/middleware.js index fb8ed2e4e..31a59ac8f 100644 --- a/react/features/large-video/middleware.js +++ b/react/features/large-video/middleware.js @@ -18,6 +18,8 @@ import { import { selectParticipant, selectParticipantInLargeVideo } from './actions'; +import './subscriber'; + /** * Middleware that catches actions related to participants and tracks and * dispatches an action to select a participant depicted by LargeVideo. diff --git a/react/features/lobby/actions.web.js b/react/features/lobby/actions.web.js index 07a061a57..ca52c29b4 100644 --- a/react/features/lobby/actions.web.js +++ b/react/features/lobby/actions.web.js @@ -2,7 +2,7 @@ import { type Dispatch } from 'redux'; -import { appNavigate, maybeRedirectToWelcomePage } from '../app'; +import { appNavigate, maybeRedirectToWelcomePage } from '../app/actions'; import { conferenceWillJoin, getCurrentConference, setPassword } from '../base/conference'; import { hideDialog, openDialog } from '../base/dialog'; import { getLocalParticipant } from '../base/participants'; diff --git a/react/features/lobby/index.js b/react/features/lobby/index.js index e4e0b51e5..68ddef9ba 100644 --- a/react/features/lobby/index.js +++ b/react/features/lobby/index.js @@ -1,6 +1,3 @@ // @flow -import './middleware'; -import './reducer'; - export * from './components'; diff --git a/react/features/local-recording/index.js b/react/features/local-recording/index.js index 049bb678d..d83e6ef8a 100644 --- a/react/features/local-recording/index.js +++ b/react/features/local-recording/index.js @@ -2,6 +2,3 @@ export * from './actions'; export * from './actionTypes'; export * from './components'; export * from './controller'; - -import './middleware'; -import './reducer'; diff --git a/react/features/local-recording/middleware.js b/react/features/local-recording/middleware.js index 8ef415b45..6b7fdc105 100644 --- a/react/features/local-recording/middleware.js +++ b/react/features/local-recording/middleware.js @@ -1,14 +1,14 @@ /* @flow */ import { createShortcutEvent, sendAnalytics } from '../analytics'; -import { APP_WILL_UNMOUNT } from '../base/app'; -import { CONFERENCE_JOINED } from '../base/conference'; -import { toggleDialog } from '../base/dialog'; +import { APP_WILL_UNMOUNT } from '../base/app/actionTypes'; +import { CONFERENCE_JOINED } from '../base/conference/actionTypes'; +import { toggleDialog } from '../base/dialog/actions'; 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 { SETTINGS_UPDATED } from '../base/settings/actionTypes'; -import { showNotification } from '../notifications'; +import { showNotification } from '../notifications/actions'; import { localRecordingEngaged, localRecordingUnengaged } from './actions'; import { LocalRecordingInfoDialog } from './components'; diff --git a/react/features/mobile/audio-mode/index.js b/react/features/mobile/audio-mode/index.js index daaa5d02a..07635cbbc 100644 --- a/react/features/mobile/audio-mode/index.js +++ b/react/features/mobile/audio-mode/index.js @@ -1,4 +1 @@ export * from './components'; - -import './middleware'; -import './reducer'; diff --git a/react/features/mobile/back-button/index.js b/react/features/mobile/back-button/index.js index 9e4c5488e..f80ffd3fc 100644 --- a/react/features/mobile/back-button/index.js +++ b/react/features/mobile/back-button/index.js @@ -1,5 +1,3 @@ // @flow export { default as BackButtonRegistry } from './BackButtonRegistry'; - -import './middleware'; diff --git a/react/features/mobile/background/index.js b/react/features/mobile/background/index.js index f3a2aac65..e40f04336 100644 --- a/react/features/mobile/background/index.js +++ b/react/features/mobile/background/index.js @@ -1,5 +1,2 @@ export * from './actions'; export * from './actionTypes'; - -import './middleware'; -import './reducer'; diff --git a/react/features/mobile/call-integration/CallKit.js b/react/features/mobile/call-integration/CallKit.js index 9b3f76830..ff4c24bb2 100644 --- a/react/features/mobile/call-integration/CallKit.js +++ b/react/features/mobile/call-integration/CallKit.js @@ -1,6 +1,6 @@ import { NativeModules, NativeEventEmitter } from 'react-native'; -import { getName } from '../../app'; +import { getName } from '../../app/functions'; /** * Thin wrapper around Apple's CallKit functionality. diff --git a/react/features/mobile/call-integration/index.js b/react/features/mobile/call-integration/index.js deleted file mode 100644 index 200d25492..000000000 --- a/react/features/mobile/call-integration/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import './middleware'; -import './reducer'; diff --git a/react/features/mobile/call-integration/middleware.js b/react/features/mobile/call-integration/middleware.js index 815567f91..965fb3eb9 100644 --- a/react/features/mobile/call-integration/middleware.js +++ b/react/features/mobile/call-integration/middleware.js @@ -4,7 +4,7 @@ import { Alert, NativeModules, Platform } from 'react-native'; import uuid from 'uuid'; 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 { SET_AUDIO_ONLY } from '../../base/audio-only'; import { diff --git a/react/features/mobile/external-api/index.js b/react/features/mobile/external-api/index.js index e975ed0e8..484b71595 100644 --- a/react/features/mobile/external-api/index.js +++ b/react/features/mobile/external-api/index.js @@ -1,3 +1 @@ export * from './functions'; - -import './middleware'; diff --git a/react/features/mobile/full-screen/index.js b/react/features/mobile/full-screen/index.js deleted file mode 100644 index 200d25492..000000000 --- a/react/features/mobile/full-screen/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import './middleware'; -import './reducer'; diff --git a/react/features/mobile/incoming-call/index.js b/react/features/mobile/incoming-call/index.js index daaa5d02a..07635cbbc 100644 --- a/react/features/mobile/incoming-call/index.js +++ b/react/features/mobile/incoming-call/index.js @@ -1,4 +1 @@ export * from './components'; - -import './middleware'; -import './reducer'; diff --git a/react/features/mobile/permissions/index.js b/react/features/mobile/permissions/index.js index e975ed0e8..484b71595 100644 --- a/react/features/mobile/permissions/index.js +++ b/react/features/mobile/permissions/index.js @@ -1,3 +1 @@ export * from './functions'; - -import './middleware'; diff --git a/react/features/mobile/proximity/index.js b/react/features/mobile/proximity/index.js deleted file mode 100644 index d43689289..000000000 --- a/react/features/mobile/proximity/index.js +++ /dev/null @@ -1 +0,0 @@ -import './middleware'; diff --git a/react/features/mobile/wake-lock/index.js b/react/features/mobile/wake-lock/index.js deleted file mode 100644 index d43689289..000000000 --- a/react/features/mobile/wake-lock/index.js +++ /dev/null @@ -1 +0,0 @@ -import './middleware'; diff --git a/react/features/mobile/watchos/index.js b/react/features/mobile/watchos/index.js deleted file mode 100644 index 200d25492..000000000 --- a/react/features/mobile/watchos/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import './middleware'; -import './reducer'; diff --git a/react/features/mobile/watchos/middleware.js b/react/features/mobile/watchos/middleware.js index 336952cbd..75c5d61f8 100644 --- a/react/features/mobile/watchos/middleware.js +++ b/react/features/mobile/watchos/middleware.js @@ -3,7 +3,7 @@ import { Platform } from 'react-native'; 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 { CONFERENCE_JOINED } from '../../base/conference'; import { getCurrentConferenceUrl } from '../../base/connection'; diff --git a/react/features/no-audio-signal/index.js b/react/features/no-audio-signal/index.js deleted file mode 100644 index d040422d0..000000000 --- a/react/features/no-audio-signal/index.js +++ /dev/null @@ -1,4 +0,0 @@ -// @flow - -import './middleware'; -import './reducer'; diff --git a/react/features/noise-detection/index.js b/react/features/noise-detection/index.js deleted file mode 100644 index d040422d0..000000000 --- a/react/features/noise-detection/index.js +++ /dev/null @@ -1,4 +0,0 @@ -// @flow - -import './middleware'; -import './reducer'; diff --git a/react/features/notifications/index.js b/react/features/notifications/index.js index 2e85be6d3..8a597c6ea 100644 --- a/react/features/notifications/index.js +++ b/react/features/notifications/index.js @@ -5,6 +5,3 @@ export * from './actionTypes'; export * from './components'; export * from './constants'; export * from './functions'; - -import './middleware'; -import './reducer'; diff --git a/react/features/old-client-notification/index.js b/react/features/old-client-notification/index.js deleted file mode 100644 index d43689289..000000000 --- a/react/features/old-client-notification/index.js +++ /dev/null @@ -1 +0,0 @@ -import './middleware'; diff --git a/react/features/overlay/components/AbstractPageReloadOverlay.js b/react/features/overlay/components/AbstractPageReloadOverlay.js index fca34348e..139a4900e 100644 --- a/react/features/overlay/components/AbstractPageReloadOverlay.js +++ b/react/features/overlay/components/AbstractPageReloadOverlay.js @@ -8,7 +8,7 @@ import { createPageReloadScheduledEvent, sendAnalytics } from '../../analytics'; -import { reloadNow } from '../../app'; +import { reloadNow } from '../../app/actions'; import { isFatalJitsiConferenceError, isFatalJitsiConnectionError diff --git a/react/features/overlay/components/native/PageReloadOverlay.js b/react/features/overlay/components/native/PageReloadOverlay.js index e194b8d13..0796470fc 100644 --- a/react/features/overlay/components/native/PageReloadOverlay.js +++ b/react/features/overlay/components/native/PageReloadOverlay.js @@ -3,7 +3,7 @@ import React from 'react'; import { Text } from 'react-native'; -import { appNavigate, reloadNow } from '../../../app'; +import { appNavigate, reloadNow } from '../../../app/actions'; import { ColorSchemeRegistry } from '../../../base/color-scheme'; import { ConfirmDialog } from '../../../base/dialog'; import { translate } from '../../../base/i18n'; diff --git a/react/features/overlay/components/web/ReloadButton.js b/react/features/overlay/components/web/ReloadButton.js index 58bdf96f8..effb37fa0 100644 --- a/react/features/overlay/components/web/ReloadButton.js +++ b/react/features/overlay/components/web/ReloadButton.js @@ -2,7 +2,7 @@ import React, { Component } from 'react'; -import { reloadNow } from '../../../app'; +import { reloadNow } from '../../../app/actions'; import { translate } from '../../../base/i18n'; import { connect } from '../../../base/redux'; diff --git a/react/features/overlay/index.js b/react/features/overlay/index.js index ff4db602c..c13d3e017 100644 --- a/react/features/overlay/index.js +++ b/react/features/overlay/index.js @@ -3,6 +3,3 @@ export * from './actions'; export * from './components'; export * from './functions'; - -import './middleware'; -import './reducer'; diff --git a/react/features/power-monitor/index.js b/react/features/power-monitor/index.js index 47fff5db3..3d915f1aa 100644 --- a/react/features/power-monitor/index.js +++ b/react/features/power-monitor/index.js @@ -2,6 +2,3 @@ export * from './actions'; export * from './actionTypes'; - -import './middleware'; -import './reducer'; diff --git a/react/features/prejoin/index.js b/react/features/prejoin/index.js index 65b9d3a89..5c58a5f3f 100644 --- a/react/features/prejoin/index.js +++ b/react/features/prejoin/index.js @@ -2,6 +2,3 @@ export * from './actions'; export * from './functions'; export { default as Prejoin } from './components/Prejoin'; - -import './middleware'; -import './reducer'; diff --git a/react/features/recent-list/components/AbstractRecentList.js b/react/features/recent-list/components/AbstractRecentList.js index f48115778..f61e3a005 100644 --- a/react/features/recent-list/components/AbstractRecentList.js +++ b/react/features/recent-list/components/AbstractRecentList.js @@ -8,7 +8,7 @@ import { createRecentSelectedEvent, sendAnalytics } from '../../analytics'; -import { appNavigate } from '../../app'; +import { appNavigate } from '../../app/actions'; import { AbstractPage, Container, diff --git a/react/features/recent-list/components/RecentList.native.js b/react/features/recent-list/components/RecentList.native.js index d737ebb8c..4aa669d44 100644 --- a/react/features/recent-list/components/RecentList.native.js +++ b/react/features/recent-list/components/RecentList.native.js @@ -3,7 +3,7 @@ import React from 'react'; import type { Dispatch } from 'redux'; -import { getDefaultURL } from '../../app'; +import { getDefaultURL } from '../../app/functions'; import { translate } from '../../base/i18n'; import { setActiveModalId } from '../../base/modal'; import { NavigateSectionList, type Section } from '../../base/react'; diff --git a/react/features/recent-list/index.js b/react/features/recent-list/index.js index daaa5d02a..07635cbbc 100644 --- a/react/features/recent-list/index.js +++ b/react/features/recent-list/index.js @@ -1,4 +1 @@ export * from './components'; - -import './middleware'; -import './reducer'; diff --git a/react/features/recording/index.js b/react/features/recording/index.js index c95362f28..286c5342f 100644 --- a/react/features/recording/index.js +++ b/react/features/recording/index.js @@ -2,6 +2,3 @@ export * from './actions'; export * from './components'; export * from './constants'; export * from './functions'; - -import './middleware'; -import './reducer'; diff --git a/react/features/rejoin/index.js b/react/features/rejoin/index.js deleted file mode 100644 index d43689289..000000000 --- a/react/features/rejoin/index.js +++ /dev/null @@ -1 +0,0 @@ -import './middleware'; diff --git a/react/features/room-lock/actions.js b/react/features/room-lock/actions.js index a3cd58866..d6f0a37f9 100644 --- a/react/features/room-lock/actions.js +++ b/react/features/room-lock/actions.js @@ -5,7 +5,7 @@ import type { Dispatch } from 'redux'; import { appNavigate, maybeRedirectToWelcomePage -} from '../app'; +} from '../app/actions'; import { conferenceLeft, JITSI_CONFERENCE_URL_KEY, diff --git a/react/features/room-lock/index.js b/react/features/room-lock/index.js index d7ebc6536..7279934d8 100644 --- a/react/features/room-lock/index.js +++ b/react/features/room-lock/index.js @@ -1,5 +1,3 @@ export * from './actions'; export * from './components'; export * from './constants'; - -import './middleware'; diff --git a/react/features/screenshot-capture/index.js b/react/features/screenshot-capture/index.js index f70f2a44f..485f1b10a 100644 --- a/react/features/screenshot-capture/index.js +++ b/react/features/screenshot-capture/index.js @@ -1,3 +1 @@ export * from './actions'; - -import './reducer'; diff --git a/react/features/settings/components/AbstractSettingsView.js b/react/features/settings/components/AbstractSettingsView.js index 35173f921..9399ed602 100644 --- a/react/features/settings/components/AbstractSettingsView.js +++ b/react/features/settings/components/AbstractSettingsView.js @@ -3,7 +3,7 @@ import { Component } from 'react'; import type { Dispatch } from 'redux'; -import { getDefaultURL } from '../../app'; +import { getDefaultURL } from '../../app/functions'; import { updateSettings } from '../../base/settings'; /** diff --git a/react/features/settings/index.js b/react/features/settings/index.js index 0bacc21c5..b826983c4 100644 --- a/react/features/settings/index.js +++ b/react/features/settings/index.js @@ -3,5 +3,3 @@ export * from './actionTypes'; export * from './components'; export * from './constants'; export * from './functions'; - -import './reducer'; diff --git a/react/features/share-room/index.js b/react/features/share-room/index.js index e72b2584a..e40f04336 100644 --- a/react/features/share-room/index.js +++ b/react/features/share-room/index.js @@ -1,4 +1,2 @@ export * from './actions'; export * from './actionTypes'; - -import './middleware'; diff --git a/react/features/share-room/middleware.js b/react/features/share-room/middleware.js index 3763ca009..c23ca0fac 100644 --- a/react/features/share-room/middleware.js +++ b/react/features/share-room/middleware.js @@ -2,7 +2,7 @@ import { Share } from 'react-native'; -import { getName } from '../app'; +import { getName } from '../app/functions'; import { MiddlewareRegistry } from '../base/redux'; import { getShareInfoText } from '../invite'; diff --git a/react/features/shared-video/index.js b/react/features/shared-video/index.js index f3a2aac65..e40f04336 100644 --- a/react/features/shared-video/index.js +++ b/react/features/shared-video/index.js @@ -1,5 +1,2 @@ export * from './actions'; export * from './actionTypes'; - -import './middleware'; -import './reducer'; diff --git a/react/features/subtitles/index.js b/react/features/subtitles/index.js index a29aa08e0..803dacd06 100644 --- a/react/features/subtitles/index.js +++ b/react/features/subtitles/index.js @@ -1,6 +1,3 @@ export * from './actions'; export * from './actionTypes'; export * from './components'; - -import './middleware'; -import './reducer'; diff --git a/react/features/talk-while-muted/index.js b/react/features/talk-while-muted/index.js deleted file mode 100644 index d040422d0..000000000 --- a/react/features/talk-while-muted/index.js +++ /dev/null @@ -1,4 +0,0 @@ -// @flow - -import './middleware'; -import './reducer'; diff --git a/react/features/toolbox/components/HangupButton.js b/react/features/toolbox/components/HangupButton.js index c182dba23..2b2d8911f 100644 --- a/react/features/toolbox/components/HangupButton.js +++ b/react/features/toolbox/components/HangupButton.js @@ -3,7 +3,7 @@ import _ from 'lodash'; import { createToolbarEvent, sendAnalytics } from '../../analytics'; -import { appNavigate } from '../../app'; +import { appNavigate } from '../../app/actions'; import { disconnect } from '../../base/connection'; import { translate } from '../../base/i18n'; import { connect } from '../../base/redux'; diff --git a/react/features/toolbox/index.js b/react/features/toolbox/index.js index 44000a1a7..b845e8859 100644 --- a/react/features/toolbox/index.js +++ b/react/features/toolbox/index.js @@ -2,6 +2,3 @@ export * from './actions'; export * from './actionTypes'; export * from './components'; export * from './functions'; - -import './middleware'; -import './reducer'; diff --git a/react/features/transcribing/index.js b/react/features/transcribing/index.js index 7f0ef0251..3c46ed49d 100644 --- a/react/features/transcribing/index.js +++ b/react/features/transcribing/index.js @@ -1,5 +1,2 @@ export * from './actions'; export * from './components'; - -import './middleware'; -import './reducer'; diff --git a/react/features/video-layout/index.js b/react/features/video-layout/index.js index a1178fd2b..b826983c4 100644 --- a/react/features/video-layout/index.js +++ b/react/features/video-layout/index.js @@ -3,7 +3,3 @@ export * from './actionTypes'; export * from './components'; export * from './constants'; export * from './functions'; - -import './middleware'; -import './reducer'; -import './subscriber'; diff --git a/react/features/video-layout/middleware.any.js b/react/features/video-layout/middleware.any.js index 2f3675f42..996b9cce3 100644 --- a/react/features/video-layout/middleware.any.js +++ b/react/features/video-layout/middleware.any.js @@ -9,6 +9,8 @@ import { SET_DOCUMENT_EDITING_STATUS, toggleDocument } from '../etherpad'; import { SET_TILE_VIEW } from './actionTypes'; import { setTileView } from './actions'; +import './subscriber'; + /** * Middleware which intercepts actions and updates tile view related state. * diff --git a/react/features/video-quality/components/OverflowMenuVideoQualityItem.web.js b/react/features/video-quality/components/OverflowMenuVideoQualityItem.web.js index 5e643a591..39c461201 100644 --- a/react/features/video-quality/components/OverflowMenuVideoQualityItem.web.js +++ b/react/features/video-quality/components/OverflowMenuVideoQualityItem.web.js @@ -2,7 +2,7 @@ import React, { Component } from 'react'; -import { VIDEO_QUALITY_LEVELS } from '../../base/conference'; +import { VIDEO_QUALITY_LEVELS } from '../../base/conference/constants'; import { translate } from '../../base/i18n'; import { Icon, diff --git a/react/features/videosipgw/index.js b/react/features/videosipgw/index.js index dbf9c8839..485f1b10a 100644 --- a/react/features/videosipgw/index.js +++ b/react/features/videosipgw/index.js @@ -1,4 +1 @@ export * from './actions'; - -import './middleware'; -import './reducer'; diff --git a/react/features/welcome/components/AbstractWelcomePage.js b/react/features/welcome/components/AbstractWelcomePage.js index acd4a7f18..b52a3525f 100644 --- a/react/features/welcome/components/AbstractWelcomePage.js +++ b/react/features/welcome/components/AbstractWelcomePage.js @@ -5,7 +5,7 @@ import { Component } from 'react'; import type { Dispatch } from 'redux'; import { createWelcomePageEvent, sendAnalytics } from '../../analytics'; -import { appNavigate } from '../../app'; +import { appNavigate } from '../../app/actions'; import isInsecureRoomName from '../../base/util/isInsecureRoomName'; import { isCalendarEnabled } from '../../calendar-sync'; import { isRecentListEnabled } from '../../recent-list/functions'; diff --git a/react/features/welcome/components/WelcomePage.native.js b/react/features/welcome/components/WelcomePage.native.js index 8272182b3..8dcac4e23 100644 --- a/react/features/welcome/components/WelcomePage.native.js +++ b/react/features/welcome/components/WelcomePage.native.js @@ -9,7 +9,7 @@ import { View } from 'react-native'; -import { getName } from '../../app'; +import { getName } from '../../app/functions'; import { ColorSchemeRegistry } from '../../base/color-scheme'; import { translate } from '../../base/i18n'; import { Icon, IconMenu, IconWarning } from '../../base/icons'; diff --git a/react/features/welcome/index.js b/react/features/welcome/index.js index 076f379b7..8b45add51 100644 --- a/react/features/welcome/index.js +++ b/react/features/welcome/index.js @@ -1,4 +1,2 @@ export * from './components'; export * from './functions'; - -import './reducer'; diff --git a/react/features/youtube-player/index.js b/react/features/youtube-player/index.js index a29aa08e0..803dacd06 100644 --- a/react/features/youtube-player/index.js +++ b/react/features/youtube-player/index.js @@ -1,6 +1,3 @@ export * from './actions'; export * from './actionTypes'; export * from './components'; - -import './middleware'; -import './reducer'; diff --git a/react/index.native.js b/react/index.native.js index 87e363598..763442988 100644 --- a/react/index.native.js +++ b/react/index.native.js @@ -7,7 +7,7 @@ import './features/mobile/polyfills'; import React, { PureComponent } from 'react'; import { AppRegistry } from 'react-native'; -import { App } from './features/app'; +import { App } from './features/app/components'; import { _initLogging } from './features/base/logging/functions'; import { IncomingCallApp } from './features/mobile/incoming-call'; diff --git a/react/index.web.js b/react/index.web.js index 2e8d8dec7..300d08419 100644 --- a/react/index.web.js +++ b/react/index.web.js @@ -5,7 +5,7 @@ import ReactDOM from 'react-dom'; import { getJitsiMeetTransport } from '../modules/transport'; -import { App } from './features/app'; +import { App } from './features/app/components'; import { getLogger } from './features/base/logging/functions'; import { Platform } from './features/base/react'; diff --git a/webpack.config.js b/webpack.config.js index 083af7484..49719fc97 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -193,7 +193,7 @@ module.exports = [ entry: { 'device_selection_popup_bundle': './react/features/settings/popup.js' }, - performance: getPerformanceHints(700 * 1024) + performance: getPerformanceHints(750 * 1024) }), Object.assign({}, config, { entry: {