Skip to content

Commit

Permalink
Merge pull request #19631 from JoVictorNunes/hide-pres-on-join-patch
Browse files Browse the repository at this point in the history
fix(layout): priority for determining whether presentation is open
  • Loading branch information
ramonlsouza committed Feb 23, 2024
2 parents a3d5fe4 + c12ab90 commit d15f541
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class PushLayoutEngine extends React.Component {
shouldShowExternalVideo,
enforceLayout,
setLocalSettings,
pushLayoutMeeting,
} = this.props;

const userLayout = LAYOUT_TYPE[getFromUserSettings('bbb_change_layout', false)];
Expand All @@ -81,9 +82,12 @@ class PushLayoutEngine extends React.Component {

Settings.save(setLocalSettings);

const initialPresentation = !getFromUserSettings('bbb_hide_presentation_on_join', HIDE_PRESENTATION || !meetingPresentationIsOpen) || shouldShowScreenshare || shouldShowExternalVideo;
MediaService.setPresentationIsOpen(layoutContextDispatch, initialPresentation);
Session.set('presentationLastState', initialPresentation);
const shouldOpenPresentation = shouldShowScreenshare || shouldShowExternalVideo;
let presentationIsOpen = !getFromUserSettings('bbb_hide_presentation_on_join', HIDE_PRESENTATION);
presentationIsOpen = pushLayoutMeeting ? meetingPresentationIsOpen : presentationIsOpen;
presentationIsOpen = shouldOpenPresentation || presentationIsOpen;
MediaService.setPresentationIsOpen(layoutContextDispatch, presentationIsOpen);
Session.set('presentationLastState', presentationIsOpen);

if (selectedLayout === 'custom') {
setTimeout(() => {
Expand Down

0 comments on commit d15f541

Please sign in to comment.