fix for issue #7027

This commit is contained in:
KDSBrowne 2019-03-14 19:34:53 +00:00
parent 0cc5aad78f
commit 341ca37add
4 changed files with 18 additions and 8 deletions

View File

@ -179,6 +179,9 @@ class ActionsDropdown extends Component {
description={formatMessage(pollBtnDesc)}
key={this.pollId}
onClick={() => {
if (Session.equals('hasPollPublished', true)) {
Session.set('hidePollResults', true);
}
Session.set('openPanel', 'poll');
Session.set('forcePollOpen', true);
}}
@ -210,7 +213,7 @@ class ActionsDropdown extends Component {
<DropdownListItem
icon="video"
label={!isSharingVideo ? intl.formatMessage(intlMessages.startExternalVideoLabel)
: intl.formatMessage(intlMessages.stopExternalVideoLabel) }
: intl.formatMessage(intlMessages.stopExternalVideoLabel)}
description="External Video"
key="external-video"
onClick={this.handleExternalVideoClick}
@ -241,8 +244,9 @@ class ActionsDropdown extends Component {
]);
}
handleExternalVideoClick = () => {
this.props.mountModal(<ExternalVideoModal />);
handleExternalVideoClick() {
const { mountModal } = this.props;
mountModal(<ExternalVideoModal />);
}
handlePresentationClick() {

View File

@ -109,13 +109,16 @@ class Poll extends Component {
componentDidUpdate() {
const { currentUser } = this.props;
if (Session.get('hidePollResults')) {
this.handleBackClick();
}
if (!currentUser.presenter) {
Session.set('openPanel', 'userlist');
Session.set('forcePollOpen', false);
}
}
handleInputChange(index, event) {
// This regex will replace any instance of 2 or more consecutive white spaces
// with a single white space character.
@ -126,6 +129,7 @@ class Poll extends Component {
handleBackClick() {
const { stopPoll } = this.props;
Session.set('hidePollResults', false);
stopPoll();
this.inputEditor = [];
@ -267,7 +271,7 @@ class Poll extends Component {
);
}
renderNoSlidePanel = () => {
renderNoSlidePanel() {
const { mountModal, intl } = this.props;
return (
<div className={styles.noSlidePanelContainer}>
@ -282,7 +286,7 @@ class Poll extends Component {
);
}
renderPollPanel = () => {
renderPollPanel() {
const { isPolling } = this.state;
const {
currentPoll,

View File

@ -4,8 +4,8 @@ import { withTracker } from 'meteor/react-meteor-data';
import Auth from '/imports/ui/services/auth';
import Presentations from '/imports/api/presentations';
import PresentationAreaService from '/imports/ui/components/presentation/service';
import Poll from './component';
import Service from './service';
import Poll from '/imports/ui/components/poll/component';
import Service from '/imports/ui/components/poll/service';
const PollContainer = ({ ...props }) => <Poll {...props} />;
@ -32,5 +32,6 @@ export default withTracker(() => {
publishPoll: Service.publishPoll,
currentPoll: Service.currentPoll(),
getUser: Service.getUser,
hideResults: Session.get('hidePollResults'),
};
})(PollContainer);

View File

@ -112,6 +112,7 @@ class LiveResult extends Component {
? (
<Button
onClick={() => {
Session.set('hasPollPublished', true);
publishPoll();
stopPoll();
}}