Only set panel settings to login defaults on login, not everytime the base component renders

This commit is contained in:
Brent Baccala 2020-11-27 16:48:02 -05:00
parent 88a2e0c4e3
commit 8845998bbd

View File

@ -383,13 +383,14 @@ const BaseContainer = withTracker(() => {
}
if (getFromUserSettings('bbb_show_participants_on_login', true) && !deviceInfo.type().isPhone) {
Session.set('openPanel', 'userlist');
if (CHAT_ENABLED && getFromUserSettings('bbb_show_public_chat_on_login', !Meteor.settings.public.chat.startClosed)) {
Session.set('openPanel', 'chat');
Session.set('idChatOpen', PUBLIC_CHAT_ID);
Session.setDefault('openPanel', 'chat');
Session.setDefault('idChatOpen', PUBLIC_CHAT_ID);
} else {
Session.setDefault('openPanel', 'userlist');
}
} else {
Session.set('openPanel', '');
Session.setDefault('openPanel', '');
}
const codeError = Session.get('codeError');