Merge pull request #6377 from KDSBrowne/hide-toolbar-onSwap

Hide presentation controls in swapped state
This commit is contained in:
Anton Georgiev 2018-12-14 15:32:48 -05:00 committed by GitHub
commit d12c01fb14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -69,4 +69,5 @@ export default {
isVideoBroadcasting,
toggleSwapLayout,
shouldEnableSwapLayout,
getSwapLayout,
};

View File

@ -2,10 +2,10 @@ import React from 'react';
import PropTypes from 'prop-types';
import { withTracker } from 'meteor/react-meteor-data';
import PresentationService from '/imports/ui/components/presentation/service';
import MediaService from '/imports/ui/components/media/service';
import PresentationToolbarService from './service';
import PresentationToolbar from './component';
const PresentationToolbarContainer = (props) => {
const {
currentSlideNum,
@ -15,10 +15,12 @@ const PresentationToolbarContainer = (props) => {
zoom,
zoomChanger,
fitToWidthHandler,
getSwapLayout
} = props;
if (userIsPresenter) {
// Only show controls if user is presenter
if (userIsPresenter && !getSwapLayout) {
// Only show controls if user is presenter and layout isn't swapped
return (
<PresentationToolbar
{...{
@ -44,6 +46,7 @@ export default withTracker((params) => {
} = data;
return {
getSwapLayout: MediaService.getSwapLayout(),
fitToWidthHandler: params.fitToWidthHandler,
userIsPresenter: PresentationService.isPresenter(podId),
numberOfSlides,