fix(prejoin) Hide prejoin screen on init join conference
This commit is contained in:
parent
e0bde6d491
commit
97ea155905
|
@ -1,7 +1,6 @@
|
|||
// @flow
|
||||
|
||||
import { setPrejoinPageVisibility, setSkipPrejoinOnReload } from '../../prejoin';
|
||||
import { PREJOIN_SCREEN_STATES } from '../../prejoin/constants';
|
||||
import { JitsiConferenceErrors } from '../lib-jitsi-meet';
|
||||
import { MiddlewareRegistry } from '../redux';
|
||||
|
||||
|
@ -14,7 +13,7 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {
|
|||
switch (action.type) {
|
||||
case CONFERENCE_JOINED: {
|
||||
if (enableForcedReload) {
|
||||
dispatch(setPrejoinPageVisibility(PREJOIN_SCREEN_STATES.HIDDEN));
|
||||
dispatch(setPrejoinPageVisibility(false));
|
||||
dispatch(setSkipPrejoinOnReload(false));
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ import { KnockingParticipantList, LobbyScreen } from '../../../lobby';
|
|||
import { getIsLobbyVisible } from '../../../lobby/functions';
|
||||
import { ParticipantsPane } from '../../../participants-pane/components/web';
|
||||
import { getParticipantsPaneOpen } from '../../../participants-pane/functions';
|
||||
import { Prejoin, isPrejoinPageVisible, isPrejoinPageLoading } from '../../../prejoin';
|
||||
import { Prejoin, isPrejoinPageVisible } from '../../../prejoin';
|
||||
import { fullScreenChanged, showToolbox } from '../../../toolbox/actions.web';
|
||||
import { JitsiPortal, Toolbox } from '../../../toolbox/components/web';
|
||||
import { LAYOUTS, getCurrentLayout } from '../../../video-layout';
|
||||
|
@ -391,7 +391,7 @@ function _mapStateToProps(state) {
|
|||
_overflowDrawer: overflowDrawer,
|
||||
_roomName: getConferenceNameForTitle(state),
|
||||
_showLobby: getIsLobbyVisible(state),
|
||||
_showPrejoin: isPrejoinPageVisible(state) || isPrejoinPageLoading(state)
|
||||
_showPrejoin: isPrejoinPageVisible(state)
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,6 @@ import {
|
|||
SET_PREJOIN_PAGE_VISIBILITY,
|
||||
SET_DEVICE_STATUS
|
||||
} from './actionTypes';
|
||||
import { type PREJOIN_SCREEN_STATE, PREJOIN_SCREEN_STATES } from './constants';
|
||||
import {
|
||||
getFullDialOutNumber,
|
||||
getDialOutConferenceUrl,
|
||||
|
@ -260,7 +259,7 @@ export function joinConference(options?: Object, ignoreJoiningInProgress: boolea
|
|||
|
||||
const jitsiTracks = localTracks.map(t => t.jitsiTrack);
|
||||
|
||||
dispatch(setPrejoinPageVisibility(PREJOIN_SCREEN_STATES.LOADING));
|
||||
dispatch(setPrejoinPageVisibility(false));
|
||||
|
||||
APP.conference.prejoinStart(jitsiTracks);
|
||||
};
|
||||
|
@ -556,10 +555,10 @@ export function setPrejoinDeviceErrors(value: Object) {
|
|||
/**
|
||||
* Action used to set the visibility of the prejoin page.
|
||||
*
|
||||
* @param {string} value - The value.
|
||||
* @param {boolean} value - The value.
|
||||
* @returns {Object}
|
||||
*/
|
||||
export function setPrejoinPageVisibility(value: PREJOIN_SCREEN_STATE) {
|
||||
export function setPrejoinPageVisibility(value: boolean) {
|
||||
return {
|
||||
type: SET_PREJOIN_PAGE_VISIBILITY,
|
||||
value
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
// @flow
|
||||
|
||||
export type PREJOIN_SCREEN_STATE = "hidden" | "loading" | true;
|
||||
|
||||
|
||||
type PREJOIN_SCREEN_STATE_TYPE = {
|
||||
HIDDEN: PREJOIN_SCREEN_STATE,
|
||||
LOADING: PREJOIN_SCREEN_STATE,
|
||||
VISIBLE: PREJOIN_SCREEN_STATE
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum of possible prejoin screen states.
|
||||
*/
|
||||
export const PREJOIN_SCREEN_STATES: PREJOIN_SCREEN_STATE_TYPE = {
|
||||
HIDDEN: 'hidden',
|
||||
LOADING: 'loading',
|
||||
VISIBLE: true // backwards compatibility with old boolean implementation
|
||||
};
|
|
@ -4,8 +4,6 @@ import { getRoomName } from '../base/conference';
|
|||
import { getDialOutStatusUrl, getDialOutUrl } from '../base/config/functions';
|
||||
import { isAudioMuted, isVideoMutedByUser } from '../base/media';
|
||||
|
||||
import { PREJOIN_SCREEN_STATES } from './constants';
|
||||
|
||||
/**
|
||||
* Selector for the visibility of the 'join by phone' button.
|
||||
*
|
||||
|
@ -162,17 +160,7 @@ export function isPrejoinPageEnabled(state: Object): boolean {
|
|||
* @returns {boolean}
|
||||
*/
|
||||
export function isPrejoinPageVisible(state: Object): boolean {
|
||||
return isPrejoinPageEnabled(state) && state['features/prejoin']?.showPrejoin === PREJOIN_SCREEN_STATES.VISIBLE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the prejoin page is loading.
|
||||
*
|
||||
* @param {Object} state - The state of the app.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function isPrejoinPageLoading(state: Object): boolean {
|
||||
return isPrejoinPageEnabled(state) && state['features/prejoin']?.showPrejoin === PREJOIN_SCREEN_STATES.LOADING;
|
||||
return isPrejoinPageEnabled(state) && state['features/prejoin']?.showPrejoin;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -15,11 +15,8 @@ import {
|
|||
setJoiningInProgress,
|
||||
setPrejoinPageVisibility
|
||||
} from './actions';
|
||||
import { PREJOIN_SCREEN_STATES } from './constants';
|
||||
import { isPrejoinPageVisible } from './functions';
|
||||
|
||||
declare var APP: Object;
|
||||
|
||||
/**
|
||||
* The redux middleware for {@link PrejoinPage}.
|
||||
*
|
||||
|
@ -88,7 +85,7 @@ MiddlewareRegistry.register(store => next => async action => {
|
|||
* @returns {Object}
|
||||
*/
|
||||
function _conferenceJoined({ dispatch }, next, action) {
|
||||
dispatch(setPrejoinPageVisibility(PREJOIN_SCREEN_STATES.HIDDEN));
|
||||
dispatch(setPrejoinPageVisibility(false));
|
||||
dispatch(setJoiningInProgress(false));
|
||||
|
||||
return next(action);
|
||||
|
|
|
@ -5,7 +5,6 @@ import { openDialog } from '../base/dialog';
|
|||
import { i18next } from '../base/i18n';
|
||||
import { updateSettings } from '../base/settings';
|
||||
import { setPrejoinPageVisibility } from '../prejoin/actions';
|
||||
import { PREJOIN_SCREEN_STATES } from '../prejoin/constants';
|
||||
import { setScreenshareFramerate } from '../screen-share/actions';
|
||||
|
||||
import {
|
||||
|
@ -85,7 +84,7 @@ export function submitMoreTab(newState: Object): Function {
|
|||
// The 'showPrejoin' flag starts as 'true' on every new session.
|
||||
// This prevents displaying the prejoin page when the user re-enables it.
|
||||
if (showPrejoinPage && getState()['features/prejoin']?.showPrejoin) {
|
||||
dispatch(setPrejoinPageVisibility(PREJOIN_SCREEN_STATES.HIDDEN));
|
||||
dispatch(setPrejoinPageVisibility(false));
|
||||
}
|
||||
dispatch(updateSettings({
|
||||
userSelectedSkipPrejoin: !showPrejoinPage
|
||||
|
|
Loading…
Reference in New Issue