From d1cf5578fc5d483921cf35db0ca37d15f58f8ecf Mon Sep 17 00:00:00 2001 From: Hristo Terezov Date: Thu, 23 Feb 2023 14:56:20 -0600 Subject: [PATCH] fix(avatar): Remove unnecessary code. --- modules/UI/UI.js | 11 ----------- modules/UI/videolayout/VideoLayout.js | 6 ------ react/features/base/participants/middleware.ts | 9 --------- 3 files changed, 26 deletions(-) diff --git a/modules/UI/UI.js b/modules/UI/UI.js index 006fca20d..23f78a718 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -292,17 +292,6 @@ UI.showToolbar = timeout => APP.store.dispatch(showToolbox(timeout)); // Used by torture. UI.dockToolbar = dock => APP.store.dispatch(dockToolbox(dock)); -/** - * Updates the displayed avatar for participant. - * - * @param {string} id - User id whose avatar should be updated. - * @param {string} avatarURL - The URL to avatar image to display. - * @returns {void} - */ -UI.refreshAvatarDisplay = function(id) { - VideoLayout.changeUserAvatar(id); -}; - /** * Notify user that connection failed. * @param {string} stropheErrorMsg raw Strophe error message diff --git a/modules/UI/videolayout/VideoLayout.js b/modules/UI/videolayout/VideoLayout.js index c41302b83..d89702bea 100644 --- a/modules/UI/videolayout/VideoLayout.js +++ b/modules/UI/videolayout/VideoLayout.js @@ -139,12 +139,6 @@ const VideoLayout = { } }, - changeUserAvatar(id, avatarUrl) { - if (this.isCurrentlyOnLarge(id)) { - largeVideo.updateAvatar(avatarUrl); - } - }, - isLargeVideoVisible() { return this.isLargeContainerTypeVisible(VIDEO_CONTAINER_TYPE); }, diff --git a/react/features/base/participants/middleware.ts b/react/features/base/participants/middleware.ts index f2ea70434..fbc031813 100644 --- a/react/features/base/participants/middleware.ts +++ b/react/features/base/participants/middleware.ts @@ -641,7 +641,6 @@ function _participantJoinedOrUpdated(store: IStore, next: Function, action: any) // Send an external update of the local participant's raised hand state // if a new raised hand state is defined in the action. if (typeof raisedHandTimestamp !== 'undefined') { - if (local) { const { conference } = getState()['features/base/conference']; const rHand = parseInt(raisedHandTimestamp, 10); @@ -691,14 +690,6 @@ function _participantJoinedOrUpdated(store: IStore, next: Function, action: any) } } - // Notify external listeners of potential avatarURL changes. - if (typeof APP === 'object') { - const currentKnownId = local ? APP.conference.getMyUserId() : id; - - // Force update of local video getting a new id. - APP.UI.refreshAvatarDisplay(currentKnownId); - } - return result; }