feat: make display name prompt platform independent
This commit is contained in:
parent
bc403adb46
commit
c1598b7376
|
@ -2200,12 +2200,6 @@ export default {
|
|||
|
||||
APP.keyboardshortcut.init();
|
||||
|
||||
if (config.requireDisplayName
|
||||
&& !APP.conference.getLocalDisplayName()
|
||||
&& !room.isHidden()) {
|
||||
APP.UI.promptDisplayName();
|
||||
}
|
||||
|
||||
APP.store.dispatch(conferenceJoined(room));
|
||||
|
||||
const displayName
|
||||
|
|
|
@ -15,7 +15,6 @@ import Filmstrip from './videolayout/Filmstrip';
|
|||
|
||||
import { getLocalParticipant } from '../../react/features/base/participants';
|
||||
import { toggleChat } from '../../react/features/chat';
|
||||
import { openDisplayNamePrompt } from '../../react/features/display-name';
|
||||
import { setEtherpadHasInitialzied } from '../../react/features/etherpad';
|
||||
import { setFilmstripVisible } from '../../react/features/filmstrip';
|
||||
import { setNotificationsEnabled } from '../../react/features/notifications';
|
||||
|
@ -549,13 +548,6 @@ UI.handleLastNEndpoints = function(leavingIds, enteringIds) {
|
|||
VideoLayout.onLastNEndpointsChanged(leavingIds, enteringIds);
|
||||
};
|
||||
|
||||
/**
|
||||
* Prompt user for nickname.
|
||||
*/
|
||||
UI.promptDisplayName = () => {
|
||||
APP.store.dispatch(openDisplayNamePrompt(undefined));
|
||||
};
|
||||
|
||||
/**
|
||||
* Update audio level visualization for specified user.
|
||||
* @param {string} id user id
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// @flow
|
||||
|
||||
import { reloadNow } from '../../app';
|
||||
import { openDisplayNamePrompt } from '../../display-name';
|
||||
|
||||
import {
|
||||
ACTION_PINNED,
|
||||
ACTION_UNPINNED,
|
||||
|
@ -12,6 +14,7 @@ import {
|
|||
import { CONNECTION_ESTABLISHED, CONNECTION_FAILED } from '../connection';
|
||||
import { JitsiConferenceErrors } from '../lib-jitsi-meet';
|
||||
import {
|
||||
getLocalParticipant,
|
||||
getParticipantById,
|
||||
getPinnedParticipant,
|
||||
PARTICIPANT_UPDATED,
|
||||
|
@ -186,6 +189,7 @@ function _conferenceJoined({ dispatch, getState }, next, action) {
|
|||
const result = next(action);
|
||||
const { conference } = action;
|
||||
const { pendingSubjectChange } = getState()['features/base/conference'];
|
||||
const { requireDisplayName } = getState()['features/base/config'];
|
||||
|
||||
pendingSubjectChange && dispatch(setSubject(pendingSubjectChange));
|
||||
|
||||
|
@ -199,6 +203,12 @@ function _conferenceJoined({ dispatch, getState }, next, action) {
|
|||
};
|
||||
window.addEventListener('beforeunload', beforeUnloadHandler);
|
||||
|
||||
if (requireDisplayName
|
||||
&& !getLocalParticipant(getState)?.name
|
||||
&& !conference.isHidden()) {
|
||||
dispatch(openDisplayNamePrompt(undefined));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue