Bläddra i källkod

fix(prejoin) Hide prejoin screen on init join conference

master
hmuresan 3 år sedan
förälder
incheckning
97ea155905

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

@@ -1,7 +1,6 @@
1 1
 // @flow
2 2
 
3 3
 import { setPrejoinPageVisibility, setSkipPrejoinOnReload } from '../../prejoin';
4
-import { PREJOIN_SCREEN_STATES } from '../../prejoin/constants';
5 4
 import { JitsiConferenceErrors } from '../lib-jitsi-meet';
6 5
 import { MiddlewareRegistry } from '../redux';
7 6
 
@@ -14,7 +13,7 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {
14 13
     switch (action.type) {
15 14
     case CONFERENCE_JOINED: {
16 15
         if (enableForcedReload) {
17
-            dispatch(setPrejoinPageVisibility(PREJOIN_SCREEN_STATES.HIDDEN));
16
+            dispatch(setPrejoinPageVisibility(false));
18 17
             dispatch(setSkipPrejoinOnReload(false));
19 18
         }
20 19
 

+ 2
- 2
react/features/conference/components/web/Conference.js Visa fil

@@ -17,7 +17,7 @@ import { KnockingParticipantList, LobbyScreen } from '../../../lobby';
17 17
 import { getIsLobbyVisible } from '../../../lobby/functions';
18 18
 import { ParticipantsPane } from '../../../participants-pane/components/web';
19 19
 import { getParticipantsPaneOpen } from '../../../participants-pane/functions';
20
-import { Prejoin, isPrejoinPageVisible, isPrejoinPageLoading } from '../../../prejoin';
20
+import { Prejoin, isPrejoinPageVisible } from '../../../prejoin';
21 21
 import { fullScreenChanged, showToolbox } from '../../../toolbox/actions.web';
22 22
 import { JitsiPortal, Toolbox } from '../../../toolbox/components/web';
23 23
 import { LAYOUTS, getCurrentLayout } from '../../../video-layout';
@@ -391,7 +391,7 @@ function _mapStateToProps(state) {
391 391
         _overflowDrawer: overflowDrawer,
392 392
         _roomName: getConferenceNameForTitle(state),
393 393
         _showLobby: getIsLobbyVisible(state),
394
-        _showPrejoin: isPrejoinPageVisible(state) || isPrejoinPageLoading(state)
394
+        _showPrejoin: isPrejoinPageVisible(state)
395 395
     };
396 396
 }
397 397
 

+ 3
- 4
react/features/prejoin/actions.js Visa fil

@@ -37,7 +37,6 @@ import {
37 37
     SET_PREJOIN_PAGE_VISIBILITY,
38 38
     SET_DEVICE_STATUS
39 39
 } from './actionTypes';
40
-import { type PREJOIN_SCREEN_STATE, PREJOIN_SCREEN_STATES } from './constants';
41 40
 import {
42 41
     getFullDialOutNumber,
43 42
     getDialOutConferenceUrl,
@@ -260,7 +259,7 @@ export function joinConference(options?: Object, ignoreJoiningInProgress: boolea
260 259
 
261 260
         const jitsiTracks = localTracks.map(t => t.jitsiTrack);
262 261
 
263
-        dispatch(setPrejoinPageVisibility(PREJOIN_SCREEN_STATES.LOADING));
262
+        dispatch(setPrejoinPageVisibility(false));
264 263
 
265 264
         APP.conference.prejoinStart(jitsiTracks);
266 265
     };
@@ -556,10 +555,10 @@ export function setPrejoinDeviceErrors(value: Object) {
556 555
 /**
557 556
  * Action used to set the visibility of the prejoin page.
558 557
  *
559
- * @param {string} value - The value.
558
+ * @param {boolean} value - The value.
560 559
  * @returns {Object}
561 560
  */
562
-export function setPrejoinPageVisibility(value: PREJOIN_SCREEN_STATE) {
561
+export function setPrejoinPageVisibility(value: boolean) {
563 562
     return {
564 563
         type: SET_PREJOIN_PAGE_VISIBILITY,
565 564
         value

+ 0
- 19
react/features/prejoin/constants.js Visa fil

@@ -1,19 +0,0 @@
1
-// @flow
2
-
3
-export type PREJOIN_SCREEN_STATE = "hidden" | "loading" | true;
4
-
5
-
6
-type PREJOIN_SCREEN_STATE_TYPE = {
7
-    HIDDEN: PREJOIN_SCREEN_STATE,
8
-    LOADING: PREJOIN_SCREEN_STATE,
9
-    VISIBLE: PREJOIN_SCREEN_STATE
10
-  }
11
-
12
-/**
13
- * Enum of possible prejoin screen states.
14
- */
15
-export const PREJOIN_SCREEN_STATES: PREJOIN_SCREEN_STATE_TYPE = {
16
-    HIDDEN: 'hidden',
17
-    LOADING: 'loading',
18
-    VISIBLE: true // backwards compatibility with old boolean implementation
19
-};

+ 1
- 13
react/features/prejoin/functions.js Visa fil

@@ -4,8 +4,6 @@ import { getRoomName } from '../base/conference';
4 4
 import { getDialOutStatusUrl, getDialOutUrl } from '../base/config/functions';
5 5
 import { isAudioMuted, isVideoMutedByUser } from '../base/media';
6 6
 
7
-import { PREJOIN_SCREEN_STATES } from './constants';
8
-
9 7
 /**
10 8
  * Selector for the visibility of the 'join by phone' button.
11 9
  *
@@ -162,17 +160,7 @@ export function isPrejoinPageEnabled(state: Object): boolean {
162 160
  * @returns {boolean}
163 161
  */
164 162
 export function isPrejoinPageVisible(state: Object): boolean {
165
-    return isPrejoinPageEnabled(state) && state['features/prejoin']?.showPrejoin === PREJOIN_SCREEN_STATES.VISIBLE;
166
-}
167
-
168
-/**
169
- * Returns true if the prejoin page is loading.
170
- *
171
- * @param {Object} state - The state of the app.
172
- * @returns {boolean}
173
- */
174
-export function isPrejoinPageLoading(state: Object): boolean {
175
-    return isPrejoinPageEnabled(state) && state['features/prejoin']?.showPrejoin === PREJOIN_SCREEN_STATES.LOADING;
163
+    return isPrejoinPageEnabled(state) && state['features/prejoin']?.showPrejoin;
176 164
 }
177 165
 
178 166
 /**

+ 1
- 4
react/features/prejoin/middleware.js Visa fil

@@ -15,11 +15,8 @@ import {
15 15
     setJoiningInProgress,
16 16
     setPrejoinPageVisibility
17 17
 } from './actions';
18
-import { PREJOIN_SCREEN_STATES } from './constants';
19 18
 import { isPrejoinPageVisible } from './functions';
20 19
 
21
-declare var APP: Object;
22
-
23 20
 /**
24 21
  * The redux middleware for {@link PrejoinPage}.
25 22
  *
@@ -88,7 +85,7 @@ MiddlewareRegistry.register(store => next => async action => {
88 85
  * @returns {Object}
89 86
  */
90 87
 function _conferenceJoined({ dispatch }, next, action) {
91
-    dispatch(setPrejoinPageVisibility(PREJOIN_SCREEN_STATES.HIDDEN));
88
+    dispatch(setPrejoinPageVisibility(false));
92 89
     dispatch(setJoiningInProgress(false));
93 90
 
94 91
     return next(action);

+ 1
- 2
react/features/settings/actions.js Visa fil

@@ -5,7 +5,6 @@ import { openDialog } from '../base/dialog';
5 5
 import { i18next } from '../base/i18n';
6 6
 import { updateSettings } from '../base/settings';
7 7
 import { setPrejoinPageVisibility } from '../prejoin/actions';
8
-import { PREJOIN_SCREEN_STATES } from '../prejoin/constants';
9 8
 import { setScreenshareFramerate } from '../screen-share/actions';
10 9
 
11 10
 import {
@@ -85,7 +84,7 @@ export function submitMoreTab(newState: Object): Function {
85 84
             // The 'showPrejoin' flag starts as 'true' on every new session.
86 85
             // This prevents displaying the prejoin page when the user re-enables it.
87 86
             if (showPrejoinPage && getState()['features/prejoin']?.showPrejoin) {
88
-                dispatch(setPrejoinPageVisibility(PREJOIN_SCREEN_STATES.HIDDEN));
87
+                dispatch(setPrejoinPageVisibility(false));
89 88
             }
90 89
             dispatch(updateSettings({
91 90
                 userSelectedSkipPrejoin: !showPrejoinPage

Laddar…
Avbryt
Spara