Bläddra i källkod

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.
master
Saúl Ibarra Corretgé 4 år sedan
förälder
incheckning
6e679f952f
100 ändrade filer med 205 tillägg och 222 borttagningar
  1. 1
    1
      Makefile
  2. 1
    1
      conference.js
  3. 1
    1
      connection.js
  4. 1
    1
      modules/UI/authentication/LoginDialog.js
  5. 0
    3
      react/features/analytics/index.js
  6. 0
    4
      react/features/app/components/AbstractApp.js
  7. 4
    15
      react/features/app/components/App.native.js
  8. 4
    10
      react/features/app/components/App.web.js
  9. 0
    7
      react/features/app/index.js
  10. 46
    0
      react/features/app/middlewares.any.js
  11. 18
    0
      react/features/app/middlewares.native.js
  12. 16
    0
      react/features/app/middlewares.web.js
  13. 49
    0
      react/features/app/reducers.any.js
  14. 12
    0
      react/features/app/reducers.native.js
  15. 15
    0
      react/features/app/reducers.web.js
  16. 1
    1
      react/features/authentication/actions.js
  17. 0
    3
      react/features/authentication/index.js
  18. 1
    1
      react/features/authentication/middleware.js
  19. 0
    2
      react/features/base/app/index.js
  20. 0
    2
      react/features/base/audio-only/index.js
  21. 0
    2
      react/features/base/color-scheme/index.js
  22. 1
    1
      react/features/base/conference/actions.js
  23. 0
    3
      react/features/base/conference/index.js
  24. 0
    3
      react/features/base/config/index.js
  25. 2
    5
      react/features/base/connection/actions.native.js
  26. 0
    2
      react/features/base/connection/index.js
  27. 0
    3
      react/features/base/devices/index.js
  28. 0
    2
      react/features/base/dialog/index.js
  29. 0
    2
      react/features/base/flags/index.js
  30. 0
    3
      react/features/base/jwt/index.js
  31. 0
    3
      react/features/base/known-domains/index.js
  32. 1
    1
      react/features/base/known-domains/middleware.js
  33. 1
    1
      react/features/base/known-domains/reducer.js
  34. 0
    3
      react/features/base/lastn/index.js
  35. 2
    2
      react/features/base/lastn/middleware.js
  36. 0
    3
      react/features/base/lib-jitsi-meet/index.js
  37. 0
    3
      react/features/base/logging/index.js
  38. 0
    3
      react/features/base/media/index.js
  39. 0
    2
      react/features/base/modal/index.js
  40. 0
    3
      react/features/base/net-info/index.js
  41. 0
    3
      react/features/base/participants/index.js
  42. 0
    3
      react/features/base/responsive-ui/index.js
  43. 0
    3
      react/features/base/settings/index.js
  44. 1
    1
      react/features/base/settings/reducer.js
  45. 1
    1
      react/features/base/sounds/functions.ios.js
  46. 0
    3
      react/features/base/sounds/index.js
  47. 0
    3
      react/features/base/testing/index.js
  48. 0
    3
      react/features/base/tracks/index.js
  49. 0
    2
      react/features/base/user-interaction/index.js
  50. 0
    2
      react/features/blur/index.js
  51. 1
    1
      react/features/calendar-sync/actions.native.js
  52. 1
    1
      react/features/calendar-sync/components/CalendarListContent.native.js
  53. 1
    1
      react/features/calendar-sync/components/CalendarListContent.web.js
  54. 1
    1
      react/features/calendar-sync/components/ConferenceNotification.native.js
  55. 0
    3
      react/features/calendar-sync/index.js
  56. 0
    3
      react/features/chat/index.js
  57. 1
    1
      react/features/conference/components/native/Conference.js
  58. 1
    2
      react/features/conference/index.js
  59. 1
    1
      react/features/conference/middleware.js
  60. 0
    2
      react/features/connection-indicator/index.js
  61. 1
    1
      react/features/deep-linking/actions.js
  62. 0
    3
      react/features/deep-linking/index.js
  63. 0
    1
      react/features/deep-linking/middleware.js
  64. 0
    3
      react/features/device-selection/index.js
  65. 0
    2
      react/features/display-name/index.js
  66. 0
    2
      react/features/dropbox/index.js
  67. 0
    3
      react/features/e2ee/index.js
  68. 0
    3
      react/features/etherpad/index.js
  69. 0
    2
      react/features/external-api/index.js
  70. 2
    0
      react/features/external-api/middleware.js
  71. 0
    2
      react/features/feedback/index.js
  72. 0
    4
      react/features/filmstrip/index.js
  73. 2
    0
      react/features/filmstrip/middleware.web.js
  74. 0
    0
      react/features/filmstrip/subscriber.native.js
  75. 0
    4
      react/features/follow-me/index.js
  76. 3
    1
      react/features/follow-me/middleware.js
  77. 0
    2
      react/features/google-api/index.js
  78. 0
    3
      react/features/invite/index.js
  79. 0
    2
      react/features/keyboard-shortcuts/index.js
  80. 0
    4
      react/features/large-video/index.js
  81. 2
    0
      react/features/large-video/middleware.js
  82. 1
    1
      react/features/lobby/actions.web.js
  83. 0
    3
      react/features/lobby/index.js
  84. 0
    3
      react/features/local-recording/index.js
  85. 5
    5
      react/features/local-recording/middleware.js
  86. 0
    3
      react/features/mobile/audio-mode/index.js
  87. 0
    2
      react/features/mobile/back-button/index.js
  88. 0
    3
      react/features/mobile/background/index.js
  89. 1
    1
      react/features/mobile/call-integration/CallKit.js
  90. 0
    2
      react/features/mobile/call-integration/index.js
  91. 1
    1
      react/features/mobile/call-integration/middleware.js
  92. 0
    2
      react/features/mobile/external-api/index.js
  93. 0
    2
      react/features/mobile/full-screen/index.js
  94. 0
    3
      react/features/mobile/incoming-call/index.js
  95. 0
    2
      react/features/mobile/permissions/index.js
  96. 0
    1
      react/features/mobile/proximity/index.js
  97. 0
    1
      react/features/mobile/wake-lock/index.js
  98. 0
    2
      react/features/mobile/watchos/index.js
  99. 1
    1
      react/features/mobile/watchos/middleware.js
  100. 0
    0
      react/features/no-audio-signal/index.js

+ 1
- 1
Makefile Visa fil

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

+ 1
- 1
conference.js Visa fil

@@ -22,7 +22,7 @@ import {
22 22
     maybeRedirectToWelcomePage,
23 23
     redirectToStaticPage,
24 24
     reloadWithStoredParams
25
-} from './react/features/app';
25
+} from './react/features/app/actions';
26 26
 import {
27 27
     AVATAR_ID_COMMAND,
28 28
     AVATAR_URL_COMMAND,

+ 1
- 1
connection.js Visa fil

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

+ 1
- 1
modules/UI/authentication/LoginDialog.js Visa fil

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

+ 0
- 3
react/features/analytics/index.js Visa fil

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

+ 0
- 4
react/features/app/components/AbstractApp.js Visa fil

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

+ 4
- 15
react/features/app/components/App.native.js Visa fil

@@ -2,32 +2,21 @@
2 2
 
3 3
 import React from 'react';
4 4
 
5
-import '../../analytics';
6
-import '../../authentication';
7 5
 import { setColorScheme } from '../../base/color-scheme';
8 6
 import { DialogContainer } from '../../base/dialog';
9 7
 import { CALL_INTEGRATION_ENABLED, updateFlags } from '../../base/flags';
10
-import '../../base/jwt';
11 8
 import { Platform } from '../../base/react';
12 9
 import { DimensionsDetector, clientResized } from '../../base/responsive-ui';
13 10
 import { updateSettings } from '../../base/settings';
14
-import '../../google-api';
15
-import '../../mobile/audio-mode';
16
-import '../../mobile/back-button';
17
-import '../../mobile/background';
18
-import '../../mobile/call-integration';
19
-import '../../mobile/external-api';
20
-import '../../mobile/full-screen';
21
-import '../../mobile/permissions';
22
-import '../../mobile/picture-in-picture';
23
-import '../../mobile/proximity';
24
-import '../../mobile/wake-lock';
25
-import '../../mobile/watchos';
26 11
 import logger from '../logger';
27 12
 
28 13
 import { AbstractApp } from './AbstractApp';
29 14
 import type { Props as AbstractAppProps } from './AbstractApp';
30 15
 
16
+// Register middlewares and reducers.
17
+import '../middlewares';
18
+import '../reducers';
19
+
31 20
 declare var __DEV__;
32 21
 
33 22
 /**

+ 4
- 10
react/features/app/components/App.web.js Visa fil

@@ -5,19 +5,13 @@ import React from 'react';
5 5
 
6 6
 import { DialogContainer } from '../../base/dialog';
7 7
 import { ChromeExtensionBanner } from '../../chrome-extension-banner';
8
-import '../../base/user-interaction';
9
-import '../../chat';
10
-import '../../external-api';
11
-import '../../no-audio-signal';
12
-import '../../noise-detection';
13
-import '../../power-monitor';
14
-import '../../room-lock';
15
-import '../../talk-while-muted';
16
-import '../../video-layout';
17
-import '../../old-client-notification';
18 8
 
19 9
 import { AbstractApp } from './AbstractApp';
20 10
 
11
+// Register middlewares and reducers.
12
+import '../middlewares';
13
+import '../reducers';
14
+
21 15
 /**
22 16
  * Root app {@code Component} on Web/React.
23 17
  *

+ 0
- 7
react/features/app/index.js Visa fil

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

+ 46
- 0
react/features/app/middlewares.any.js Visa fil

@@ -0,0 +1,46 @@
1
+// @flow
2
+
3
+import '../analytics/middleware';
4
+import '../base/conference/middleware';
5
+import '../base/config/middleware';
6
+import '../base/jwt/middleware';
7
+import '../base/known-domains/middleware';
8
+import '../base/lastn/middleware';
9
+import '../base/lib-jitsi-meet/middleware';
10
+import '../base/logging/middleware';
11
+import '../base/media/middleware';
12
+import '../base/net-info/middleware';
13
+import '../base/participants/middleware';
14
+import '../base/redux/middleware';
15
+import '../base/responsive-ui/middleware';
16
+import '../base/settings/middleware';
17
+import '../base/sounds/middleware';
18
+import '../base/testing/middleware';
19
+import '../base/tracks/middleware';
20
+import '../base/user-interaction/middleware';
21
+import '../calendar-sync/middleware';
22
+import '../chat/middleware';
23
+import '../conference/middleware';
24
+import '../connection-indicator/middleware';
25
+import '../deep-linking/middleware';
26
+import '../device-selection/middleware';
27
+import '../display-name/middleware';
28
+import '../etherpad/middleware';
29
+import '../filmstrip/middleware';
30
+import '../follow-me/middleware';
31
+import '../invite/middleware';
32
+import '../large-video/middleware';
33
+import '../lobby/middleware';
34
+import '../notifications/middleware';
35
+import '../overlay/middleware';
36
+import '../recent-list/middleware';
37
+import '../recording/middleware';
38
+import '../rejoin/middleware';
39
+import '../room-lock/middleware';
40
+import '../subtitles/middleware';
41
+import '../toolbox/middleware';
42
+import '../transcribing/middleware';
43
+import '../video-layout/middleware';
44
+import '../videosipgw/middleware';
45
+
46
+import './middleware';

+ 18
- 0
react/features/app/middlewares.native.js Visa fil

@@ -0,0 +1,18 @@
1
+// @flow
2
+
3
+import '../authentication/middleware';
4
+import '../mobile/audio-mode/middleware';
5
+import '../mobile/back-button/middleware';
6
+import '../mobile/background/middleware';
7
+import '../mobile/call-integration/middleware';
8
+import '../mobile/external-api/middleware';
9
+import '../mobile/full-screen/middleware';
10
+import '../mobile/incoming-call/middleware';
11
+import '../mobile/permissions/middleware';
12
+import '../mobile/proximity/middleware';
13
+import '../mobile/wake-lock/middleware';
14
+import '../mobile/watchos/middleware';
15
+import '../share-room/middleware';
16
+import '../youtube-player/middleware';
17
+
18
+import './middlewares.any';

+ 16
- 0
react/features/app/middlewares.web.js Visa fil

@@ -0,0 +1,16 @@
1
+// @flow
2
+
3
+import '../base/devices/middleware';
4
+import '../e2ee/middleware';
5
+import '../external-api/middleware';
6
+import '../keyboard-shortcuts/middleware';
7
+import '../local-recording/middleware';
8
+import '../no-audio-signal/middleware';
9
+import '../noise-detection/middleware';
10
+import '../old-client-notification/middleware';
11
+import '../power-monitor/middleware';
12
+import '../prejoin/middleware';
13
+import '../shared-video/middleware';
14
+import '../talk-while-muted/middleware';
15
+
16
+import './middlewares.any';

+ 49
- 0
react/features/app/reducers.any.js Visa fil

@@ -0,0 +1,49 @@
1
+// @flow
2
+
3
+import '../analytics/reducer';
4
+import '../base/app/reducer';
5
+import '../base/audio-only/reducer';
6
+import '../base/color-scheme/reducer';
7
+import '../base/conference/reducer';
8
+import '../base/config/reducer';
9
+import '../base/connection/reducer';
10
+import '../base/dialog/reducer';
11
+import '../base/flags/reducer';
12
+import '../base/jwt/reducer';
13
+import '../base/known-domains/reducer';
14
+import '../base/lib-jitsi-meet/reducer';
15
+import '../base/logging/reducer';
16
+import '../base/media/reducer';
17
+import '../base/modal/reducer';
18
+import '../base/net-info/reducer';
19
+import '../base/participants/reducer';
20
+import '../base/responsive-ui/reducer';
21
+import '../base/settings/reducer';
22
+import '../base/sounds/reducer';
23
+import '../base/testing/reducer';
24
+import '../base/tracks/reducer';
25
+import '../base/user-interaction/reducer';
26
+import '../blur/reducer';
27
+import '../calendar-sync/reducer';
28
+import '../chat/reducer';
29
+import '../deep-linking/reducer';
30
+import '../device-selection/reducer';
31
+import '../dropbox/reducer';
32
+import '../etherpad/reducer';
33
+import '../filmstrip/reducer';
34
+import '../follow-me/reducer';
35
+import '../google-api/reducer';
36
+import '../invite/reducer';
37
+import '../large-video/reducer';
38
+import '../lobby/reducer';
39
+import '../notifications/reducer';
40
+import '../overlay/reducer';
41
+import '../recent-list/reducer';
42
+import '../recording/reducer';
43
+import '../settings/reducer';
44
+import '../subtitles/reducer';
45
+import '../toolbox/reducer';
46
+import '../transcribing/reducer';
47
+import '../video-layout/reducer';
48
+import '../videosipgw/reducer';
49
+import '../welcome/reducer';

+ 12
- 0
react/features/app/reducers.native.js Visa fil

@@ -0,0 +1,12 @@
1
+// @flow
2
+
3
+import '../authentication/reducer';
4
+import '../mobile/audio-mode/reducer';
5
+import '../mobile/background/reducer';
6
+import '../mobile/call-integration/reducer';
7
+import '../mobile/full-screen/reducer';
8
+import '../mobile/incoming-call/reducer';
9
+import '../mobile/watchos/reducer';
10
+import '../youtube-player/reducer';
11
+
12
+import './reducers.any';

+ 15
- 0
react/features/app/reducers.web.js Visa fil

@@ -0,0 +1,15 @@
1
+// @flow
2
+
3
+import '../base/devices/reducer';
4
+import '../e2ee/reducer';
5
+import '../feedback/reducer';
6
+import '../local-recording/reducer';
7
+import '../no-audio-signal/reducer';
8
+import '../noise-detection/reducer';
9
+import '../power-monitor/reducer';
10
+import '../prejoin/reducer';
11
+import '../screenshot-capture/reducer';
12
+import '../shared-video/reducer';
13
+import '../talk-while-muted/reducer';
14
+
15
+import './reducers.any';

+ 1
- 1
react/features/authentication/actions.js Visa fil

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

+ 0
- 3
react/features/authentication/index.js Visa fil

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

+ 1
- 1
react/features/authentication/middleware.js Visa fil

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

+ 0
- 2
react/features/base/app/index.js Visa fil

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

+ 0
- 2
react/features/base/audio-only/index.js Visa fil

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

+ 0
- 2
react/features/base/color-scheme/index.js Visa fil

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

+ 1
- 1
react/features/base/conference/actions.js Visa fil

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

+ 0
- 3
react/features/base/conference/index.js Visa fil

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

+ 0
- 3
react/features/base/config/index.js Visa fil

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

+ 2
- 5
react/features/base/connection/actions.native.js Visa fil

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

+ 0
- 2
react/features/base/connection/index.js Visa fil

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

+ 0
- 3
react/features/base/devices/index.js Visa fil

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

+ 0
- 2
react/features/base/dialog/index.js Visa fil

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

+ 0
- 2
react/features/base/flags/index.js Visa fil

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

+ 0
- 3
react/features/base/jwt/index.js Visa fil

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

+ 0
- 3
react/features/base/known-domains/index.js Visa fil

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

+ 1
- 1
react/features/base/known-domains/middleware.js Visa fil

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

+ 1
- 1
react/features/base/known-domains/reducer.js Visa fil

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

+ 0
- 3
react/features/base/lastn/index.js Visa fil

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

+ 2
- 2
react/features/base/lastn/middleware.js Visa fil

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

+ 0
- 3
react/features/base/lib-jitsi-meet/index.js Visa fil

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

+ 0
- 3
react/features/base/logging/index.js Visa fil

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

+ 0
- 3
react/features/base/media/index.js Visa fil

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

+ 0
- 2
react/features/base/modal/index.js Visa fil

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

+ 0
- 3
react/features/base/net-info/index.js Visa fil

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

+ 0
- 3
react/features/base/participants/index.js Visa fil

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

+ 0
- 3
react/features/base/responsive-ui/index.js Visa fil

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

+ 0
- 3
react/features/base/settings/index.js Visa fil

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

+ 1
- 1
react/features/base/settings/reducer.js Visa fil

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

+ 1
- 1
react/features/base/sounds/functions.ios.js Visa fil

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

+ 0
- 3
react/features/base/sounds/index.js Visa fil

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

+ 0
- 3
react/features/base/testing/index.js Visa fil

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

+ 0
- 3
react/features/base/tracks/index.js Visa fil

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

+ 0
- 2
react/features/base/user-interaction/index.js Visa fil

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

+ 0
- 2
react/features/blur/index.js Visa fil

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

+ 1
- 1
react/features/calendar-sync/actions.native.js Visa fil

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

+ 1
- 1
react/features/calendar-sync/components/CalendarListContent.native.js Visa fil

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

+ 1
- 1
react/features/calendar-sync/components/CalendarListContent.web.js Visa fil

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

+ 1
- 1
react/features/calendar-sync/components/ConferenceNotification.native.js Visa fil

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

+ 0
- 3
react/features/calendar-sync/index.js Visa fil

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

+ 0
- 3
react/features/chat/index.js Visa fil

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

+ 1
- 1
react/features/conference/components/native/Conference.js Visa fil

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

+ 1
- 2
react/features/conference/index.js Visa fil

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

+ 1
- 1
react/features/conference/middleware.js Visa fil

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

+ 0
- 2
react/features/connection-indicator/index.js Visa fil

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

+ 1
- 1
react/features/deep-linking/actions.js Visa fil

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

+ 0
- 3
react/features/deep-linking/index.js Visa fil

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

+ 0
- 1
react/features/deep-linking/middleware.js Visa fil

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

+ 0
- 3
react/features/device-selection/index.js Visa fil

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

+ 0
- 2
react/features/display-name/index.js Visa fil

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

+ 0
- 2
react/features/dropbox/index.js Visa fil

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

+ 0
- 3
react/features/e2ee/index.js Visa fil

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

+ 0
- 3
react/features/etherpad/index.js Visa fil

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

+ 0
- 2
react/features/external-api/index.js Visa fil

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

+ 2
- 0
react/features/external-api/middleware.js Visa fil

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

+ 0
- 2
react/features/feedback/index.js Visa fil

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

+ 0
- 4
react/features/filmstrip/index.js Visa fil

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

+ 2
- 0
react/features/filmstrip/middleware.web.js Visa fil

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

+ 0
- 0
react/features/filmstrip/subscriber.native.js Visa fil


+ 0
- 4
react/features/follow-me/index.js Visa fil

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

+ 3
- 1
react/features/follow-me/middleware.js Visa fil

@@ -1,6 +1,6 @@
1 1
 // @flow
2 2
 
3
-import { CONFERENCE_WILL_JOIN } from '../base/conference';
3
+import { CONFERENCE_WILL_JOIN } from '../base/conference/actionTypes';
4 4
 import {
5 5
     getParticipantById,
6 6
     getPinnedParticipant,
@@ -19,6 +19,8 @@ import { FOLLOW_ME_COMMAND } from './constants';
19 19
 import { isFollowMeActive } from './functions';
20 20
 import logger from './logger';
21 21
 
22
+import './subscriber';
23
+
22 24
 declare var APP: Object;
23 25
 
24 26
 /**

+ 0
- 2
react/features/google-api/index.js Visa fil

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

+ 0
- 3
react/features/invite/index.js Visa fil

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

+ 0
- 2
react/features/keyboard-shortcuts/index.js Visa fil

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

+ 0
- 4
react/features/large-video/index.js Visa fil

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

+ 2
- 0
react/features/large-video/middleware.js Visa fil

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

+ 1
- 1
react/features/lobby/actions.web.js Visa fil

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

+ 0
- 3
react/features/lobby/index.js Visa fil

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

+ 0
- 3
react/features/local-recording/index.js Visa fil

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

+ 5
- 5
react/features/local-recording/middleware.js Visa fil

@@ -1,14 +1,14 @@
1 1
 /* @flow */
2 2
 
3 3
 import { createShortcutEvent, sendAnalytics } from '../analytics';
4
-import { APP_WILL_UNMOUNT } from '../base/app';
5
-import { CONFERENCE_JOINED } from '../base/conference';
6
-import { toggleDialog } from '../base/dialog';
4
+import { APP_WILL_UNMOUNT } from '../base/app/actionTypes';
5
+import { CONFERENCE_JOINED } from '../base/conference/actionTypes';
6
+import { toggleDialog } from '../base/dialog/actions';
7 7
 import { i18next } from '../base/i18n';
8
-import { SET_AUDIO_MUTED } from '../base/media';
8
+import { SET_AUDIO_MUTED } from '../base/media/actionTypes';
9 9
 import { MiddlewareRegistry } from '../base/redux';
10 10
 import { SETTINGS_UPDATED } from '../base/settings/actionTypes';
11
-import { showNotification } from '../notifications';
11
+import { showNotification } from '../notifications/actions';
12 12
 
13 13
 import { localRecordingEngaged, localRecordingUnengaged } from './actions';
14 14
 import { LocalRecordingInfoDialog } from './components';

+ 0
- 3
react/features/mobile/audio-mode/index.js Visa fil

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

+ 0
- 2
react/features/mobile/back-button/index.js Visa fil

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

+ 0
- 3
react/features/mobile/background/index.js Visa fil

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

+ 1
- 1
react/features/mobile/call-integration/CallKit.js Visa fil

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

+ 0
- 2
react/features/mobile/call-integration/index.js Visa fil

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

+ 1
- 1
react/features/mobile/call-integration/middleware.js Visa fil

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

+ 0
- 2
react/features/mobile/external-api/index.js Visa fil

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

+ 0
- 2
react/features/mobile/full-screen/index.js Visa fil

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

+ 0
- 3
react/features/mobile/incoming-call/index.js Visa fil

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

+ 0
- 2
react/features/mobile/permissions/index.js Visa fil

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

+ 0
- 1
react/features/mobile/proximity/index.js Visa fil

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

+ 0
- 1
react/features/mobile/wake-lock/index.js Visa fil

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

+ 0
- 2
react/features/mobile/watchos/index.js Visa fil

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

+ 1
- 1
react/features/mobile/watchos/middleware.js Visa fil

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

+ 0
- 0
react/features/no-audio-signal/index.js Visa fil


Vissa filer visades inte eftersom för många filer har ändrats

Laddar…
Avbryt
Spara