Uses avatarId from settings.

Removes unused variable bottomToolbarEnabled.
This commit is contained in:
damencho 2016-08-31 11:40:06 -05:00
parent 6f10156bf3
commit 3138748f57
1 changed files with 20 additions and 6 deletions

View File

@ -308,7 +308,12 @@ UI.initConference = function () {
} }
// Make sure we configure our avatar id, before creating avatar for us // Make sure we configure our avatar id, before creating avatar for us
UI.setUserEmail(id, Settings.getEmail()); let email = Settings.getEmail();
if (email) {
UI.setUserEmail(id, email);
} else {
UI.setUserAvatarID(id, Settings.getAvatarId());
}
Toolbar.checkAutoEnableDesktopSharing(); Toolbar.checkAutoEnableDesktopSharing();
@ -839,7 +844,7 @@ UI.dockToolbar = function (isDock) {
/** /**
* Updates the avatar for participant. * Updates the avatar for participant.
* @param {string} id user id * @param {string} id user id
* @param {stirng} avatarUrl the URL for the avatar * @param {string} avatarUrl the URL for the avatar
*/ */
function changeAvatar(id, avatarUrl) { function changeAvatar(id, avatarUrl) {
VideoLayout.changeUserAvatar(id, avatarUrl); VideoLayout.changeUserAvatar(id, avatarUrl);
@ -852,7 +857,7 @@ function changeAvatar(id, avatarUrl) {
/** /**
* Update user email. * Update user email.
* @param {string} id user id * @param {string} id user id
* @param {stirng} email user email * @param {string} email user email
*/ */
UI.setUserEmail = function (id, email) { UI.setUserEmail = function (id, email) {
// update avatar // update avatar
@ -861,11 +866,22 @@ UI.setUserEmail = function (id, email) {
changeAvatar(id, Avatar.getAvatarUrl(id)); changeAvatar(id, Avatar.getAvatarUrl(id));
}; };
/**
* Update user avtar id.
* @param {string} id user id
* @param {string} avatarId user's avatar id
*/
UI.setUserAvatarID = function (id, avatarId) {
// update avatar
Avatar.setUserAvatarID(id, avatarId);
changeAvatar(id, Avatar.getAvatarUrl(id));
};
/** /**
* Update user avatar URL. * Update user avatar URL.
* @param {string} id user id * @param {string} id user id
* @param {stirng} url user avatar url * @param {string} url user avatar url
*/ */
UI.setUserAvatarUrl = function (id, url) { UI.setUserAvatarUrl = function (id, url) {
// update avatar // update avatar
@ -1440,8 +1456,6 @@ UI.enableMicrophoneButton = function () {
Toolbar.markAudioIconAsDisabled(false); Toolbar.markAudioIconAsDisabled(false);
}; };
let bottomToolbarEnabled = null;
UI.showRingOverLay = function () { UI.showRingOverLay = function () {
RingOverlay.show(APP.tokenData.callee); RingOverlay.show(APP.tokenData.callee);
FilmStrip.toggleFilmStrip(false); FilmStrip.toggleFilmStrip(false);