Merge pull request #1106 from jitsi/disabled-sidepanels-load
Disables loading side panels when they are disabled.
This commit is contained in:
commit
f02f050e56
|
@ -514,6 +514,7 @@ export default {
|
||||||
this.isDesktopSharingEnabled =
|
this.isDesktopSharingEnabled =
|
||||||
JitsiMeetJS.isDesktopSharingEnabled();
|
JitsiMeetJS.isDesktopSharingEnabled();
|
||||||
|
|
||||||
|
if (UIUtil.isButtonEnabled('contacts'))
|
||||||
APP.UI.ContactList = new ContactList(room);
|
APP.UI.ContactList = new ContactList(room);
|
||||||
|
|
||||||
// if user didn't give access to mic or camera or doesn't have
|
// if user didn't give access to mic or camera or doesn't have
|
||||||
|
|
|
@ -203,6 +203,7 @@ UI.showChatError = function (err, msg) {
|
||||||
* @param {string} displayName new nickname
|
* @param {string} displayName new nickname
|
||||||
*/
|
*/
|
||||||
UI.changeDisplayName = function (id, displayName) {
|
UI.changeDisplayName = function (id, displayName) {
|
||||||
|
if (UI.ContactList)
|
||||||
UI.ContactList.onDisplayNameChange(id, displayName);
|
UI.ContactList.onDisplayNameChange(id, displayName);
|
||||||
VideoLayout.onDisplayNameChanged(id, displayName);
|
VideoLayout.onDisplayNameChanged(id, displayName);
|
||||||
|
|
||||||
|
@ -249,6 +250,7 @@ UI.setLocalRaisedHandStatus = (raisedHandStatus) => {
|
||||||
UI.initConference = function () {
|
UI.initConference = function () {
|
||||||
let id = APP.conference.getMyUserId();
|
let id = APP.conference.getMyUserId();
|
||||||
// Add myself to the contact list.
|
// Add myself to the contact list.
|
||||||
|
if (UI.ContactList)
|
||||||
UI.ContactList.addContact(id, true);
|
UI.ContactList.addContact(id, true);
|
||||||
|
|
||||||
// Update default button states before showing the toolbar
|
// Update default button states before showing the toolbar
|
||||||
|
@ -559,6 +561,7 @@ UI.addUser = function (user) {
|
||||||
var id = user.getId();
|
var id = user.getId();
|
||||||
var displayName = user.getDisplayName();
|
var displayName = user.getDisplayName();
|
||||||
UI.hideRingOverLay();
|
UI.hideRingOverLay();
|
||||||
|
if (UI.ContactList)
|
||||||
UI.ContactList.addContact(id);
|
UI.ContactList.addContact(id);
|
||||||
|
|
||||||
messageHandler.notify(
|
messageHandler.notify(
|
||||||
|
@ -586,6 +589,7 @@ UI.addUser = function (user) {
|
||||||
* @param {string} displayName user nickname
|
* @param {string} displayName user nickname
|
||||||
*/
|
*/
|
||||||
UI.removeUser = function (id, displayName) {
|
UI.removeUser = function (id, displayName) {
|
||||||
|
if (UI.ContactList)
|
||||||
UI.ContactList.removeContact(id);
|
UI.ContactList.removeContact(id);
|
||||||
|
|
||||||
messageHandler.notify(
|
messageHandler.notify(
|
||||||
|
@ -838,6 +842,7 @@ UI.dockToolbar = function (isDock) {
|
||||||
*/
|
*/
|
||||||
function changeAvatar(id, avatarUrl) {
|
function changeAvatar(id, avatarUrl) {
|
||||||
VideoLayout.changeUserAvatar(id, avatarUrl);
|
VideoLayout.changeUserAvatar(id, avatarUrl);
|
||||||
|
if (UI.ContactList)
|
||||||
UI.ContactList.changeUserAvatar(id, avatarUrl);
|
UI.ContactList.changeUserAvatar(id, avatarUrl);
|
||||||
if (APP.conference.isLocalId(id)) {
|
if (APP.conference.isLocalId(id)) {
|
||||||
Profile.changeAvatar(avatarUrl);
|
Profile.changeAvatar(avatarUrl);
|
||||||
|
|
|
@ -2,16 +2,21 @@ import Chat from './chat/Chat';
|
||||||
import SettingsMenu from './settings/SettingsMenu';
|
import SettingsMenu from './settings/SettingsMenu';
|
||||||
import Profile from './profile/Profile';
|
import Profile from './profile/Profile';
|
||||||
import ContactListView from './contactlist/ContactListView';
|
import ContactListView from './contactlist/ContactListView';
|
||||||
|
import UIUtil from '../util/UIUtil';
|
||||||
|
|
||||||
const SidePanels = {
|
const SidePanels = {
|
||||||
init (eventEmitter) {
|
init (eventEmitter) {
|
||||||
//Initialize chat
|
//Initialize chat
|
||||||
|
if (UIUtil.isButtonEnabled('chat'))
|
||||||
Chat.init(eventEmitter);
|
Chat.init(eventEmitter);
|
||||||
//Initialize settings
|
//Initialize settings
|
||||||
|
if (UIUtil.isButtonEnabled('settings'))
|
||||||
SettingsMenu.init(eventEmitter);
|
SettingsMenu.init(eventEmitter);
|
||||||
//Initialize profile
|
//Initialize profile
|
||||||
|
if (UIUtil.isButtonEnabled('profile'))
|
||||||
Profile.init(eventEmitter);
|
Profile.init(eventEmitter);
|
||||||
//Initialize contact list view
|
//Initialize contact list view
|
||||||
|
if (UIUtil.isButtonEnabled('contacts'))
|
||||||
ContactListView.init();
|
ContactListView.init();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue