Merge remote-tracking branch 'upstream/develop' into allow-to-remove-all-presentations

This commit is contained in:
Joao Siebel 2021-08-24 10:39:07 -03:00
commit 06b1838777
3 changed files with 19 additions and 10 deletions

View File

@ -430,12 +430,25 @@ class PresentationUploader extends Component {
const {
handleSave,
selectedToBeNextCurrent,
presentations: propPresentations,
dispatchTogglePresentationDownloadable,
} = this.props;
const { disableActions, presentations } = this.state;
const presentationsToSave = presentations;
this.setState({ disableActions: true });
presentations.forEach(item => {
if (item.upload.done) {
const didDownloadableStateChange = propPresentations.some(
(p) => p.id === item.id && p.isDownloadable !== item.isDownloadable
);
if (didDownloadableStateChange) {
dispatchTogglePresentationDownloadable(item, item.isDownloadable);
}
}
});
if (hasNewUpload) {
this.toastId = toast.info(this.renderToastList(), {
hideProgressBar: true,
@ -501,7 +514,6 @@ class PresentationUploader extends Component {
}
handleToggleDownloadable(item) {
const { dispatchTogglePresentationDownloadable } = this.props;
const { presentations } = this.state;
const oldDownloadableState = item.isDownloadable;
@ -520,12 +532,6 @@ class PresentationUploader extends Component {
this.setState({
presentations: presentationsUpdated,
});
// If the presentation has not be uploaded yet, adjusting the state suffices
// otherwise set previously uploaded presentation to [not] be downloadable
if (item.upload.done) {
dispatchTogglePresentationDownloadable(item, !oldDownloadableState);
}
}
updateFileKey(id, key, value, operation = '$set') {

View File

@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { defineMessages } from 'react-intl';
import Icon from '/imports/ui/components/icon/component';
import _ from 'lodash';
import { styles } from './styles';
const messages = defineMessages({
@ -83,7 +84,7 @@ const UserName = (props) => {
if (user.isSharingWebcam && LABEL.sharingWebcam) {
userNameSub.push(
<span>
<span key={_.uniqueId('video-')}>
<Icon iconName="video" />
&nbsp;
{intl.formatMessage(messages.sharingWebcam)}
@ -93,7 +94,7 @@ const UserName = (props) => {
if (isThisMeetingLocked && user.locked && user.role !== ROLE_MODERATOR) {
userNameSub.push(
<span>
<span key={_.uniqueId('lock-')}>
<Icon iconName="lock" />
&nbsp;
{intl.formatMessage(messages.locked)}
@ -123,7 +124,7 @@ const UserName = (props) => {
<span aria-hidden className={styles.userNameMain}>
<span>
{user.name}
&nbsp;
&nbsp;
</span>
<i>{(isMe(user.userId)) ? `(${intl.formatMessage(messages.you)})` : ''}</i>
</span>

View File

@ -1,5 +1,7 @@
[Unit]
Description=BigBlueButton resque worker for recordings
Wants=redis.service
After=redis.service
[Service]
Type=simple