Revert "fix(Prejoin): Make prejoin name noneditable only when taken from jwt"

This reverts commit af7c316827.
This commit is contained in:
Дамян Минков 2021-11-29 17:44:31 -06:00
parent 2adb5dc7d6
commit d8487c25b2
2 changed files with 3 additions and 13 deletions

View File

@ -4,6 +4,7 @@ import InlineDialog from '@atlaskit/inline-dialog';
import React, { Component } from 'react';
import { getRoomName } from '../../base/conference';
import { isNameReadOnly } from '../../base/config';
import { translate } from '../../base/i18n';
import { IconArrowDown, IconArrowUp, IconPhone, IconVolumeOff } from '../../base/icons';
import { isVideoMutedByUser } from '../../base/media';
@ -20,8 +21,7 @@ import {
isDeviceStatusVisible,
isDisplayNameRequired,
isJoinByPhoneButtonVisible,
isJoinByPhoneDialogVisible,
isPrejoinNameReadOnly
isJoinByPhoneDialogVisible
} from '../functions';
import DropdownButton from './DropdownButton';
@ -388,7 +388,7 @@ function mapStateToProps(state): Object {
showDialog: isJoinByPhoneDialogVisible(state),
showErrorOnJoin,
hasJoinByPhoneButton: isJoinByPhoneButtonVisible(state),
readOnlyName: isPrejoinNameReadOnly(state),
readOnlyName: isNameReadOnly(state),
showCameraPreview: !isVideoMutedByUser(state),
videoTrack: getLocalJitsiVideoTrack(state)
};

View File

@ -36,16 +36,6 @@ export function isDisplayNameRequired(state: Object): boolean {
|| state['features/base/config'].requireDisplayName;
}
/**
* Selector for determining if the display name from prejoin page is read only.
*
* @param {Object} state - The state of the app.
* @returns {boolean}
*/
export function isPrejoinNameReadOnly(state: Object): boolean {
return Boolean(state['features/base/jwt']?.user?.name);
}
/**
* Selector for determining if the user has chosen to skip prejoin page.
*