mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 03:12:29 +00:00
ref(settings): remove changeLocalDisplayName action
This commit is contained in:
@@ -41,6 +41,7 @@ import {
|
||||
import { LOCAL_PARTICIPANT_DEFAULT_ID } from '../../react/features/base/participants/constants';
|
||||
import {
|
||||
getLocalParticipant,
|
||||
getNormalizedDisplayName,
|
||||
getParticipantById,
|
||||
getScreenshareParticipantIds,
|
||||
getVirtualScreenshareParticipantByOwnerId,
|
||||
@@ -105,7 +106,6 @@ import { startAudioScreenShareFlow, startScreenShareFlow } from '../../react/fea
|
||||
import { isScreenAudioSupported } from '../../react/features/screen-share/functions';
|
||||
import { toggleScreenshotCaptureSummary } from '../../react/features/screenshot-capture/actions';
|
||||
import { isScreenshotCaptureEnabled } from '../../react/features/screenshot-capture/functions';
|
||||
import { changeLocalDisplayName } from '../../react/features/settings/actions.web';
|
||||
import SettingsDialog from '../../react/features/settings/components/web/SettingsDialog';
|
||||
import { SETTINGS_TABS } from '../../react/features/settings/constants';
|
||||
import { playSharedVideo, stopSharedVideo } from '../../react/features/shared-video/actions.any';
|
||||
@@ -201,7 +201,7 @@ function initCommands() {
|
||||
},
|
||||
'display-name': displayName => {
|
||||
sendAnalytics(createApiEvent('display.name.changed'));
|
||||
APP.store.dispatch(changeLocalDisplayName(displayName));
|
||||
APP.store.dispatch(updateSettings({ displayName: getNormalizedDisplayName(displayName) }));
|
||||
},
|
||||
'local-subject': localSubject => {
|
||||
sendAnalytics(createApiEvent('local.subject.changed'));
|
||||
|
||||
@@ -36,16 +36,3 @@ export function openLogoutDialog() {
|
||||
}));
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the display name for the local user.
|
||||
*
|
||||
* @param {string} _nickname - The new display name.
|
||||
* @returns {Function}
|
||||
*/
|
||||
export function changeLocalDisplayName(_nickname = '') {
|
||||
// not used on mobile.
|
||||
return (_dispatch: IStore['dispatch'], _getState: IStore['getState']) => {
|
||||
// no-op action.
|
||||
};
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ export function submitProfileTab(newState: any) {
|
||||
const currentState = getProfileTabProps(getState());
|
||||
|
||||
if (newState.displayName !== currentState.displayName) {
|
||||
dispatch(changeLocalDisplayName(newState.displayName));
|
||||
dispatch(updateSettings({ displayName: getNormalizedDisplayName(newState.displayName) }));
|
||||
}
|
||||
|
||||
if (newState.email !== currentState.email) {
|
||||
@@ -201,20 +201,6 @@ export function submitProfileTab(newState: any) {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the display name for the local user.
|
||||
*
|
||||
* @param {string} nickname - The new display name.
|
||||
* @returns {Function}
|
||||
*/
|
||||
export function changeLocalDisplayName(nickname = '') {
|
||||
return (dispatch: IStore['dispatch']) => {
|
||||
const formattedNickname = getNormalizedDisplayName(nickname);
|
||||
|
||||
dispatch(updateSettings({ displayName: formattedNickname }));
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Submits the settings from the "Sounds" tab of the settings dialog.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user