Merge pull request #14809 from ramonlsouza/24-25-merge-apr12

chore: Merge 2.4 into 2.5
This commit is contained in:
Anton Georgiev 2022-04-12 15:22:04 -04:00 committed by GitHub
commit edeb6c1c50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 14 deletions

View File

@ -157,6 +157,8 @@ class App extends Component {
isRTL,
hidePresentation,
autoSwapLayout,
shouldShowScreenshare,
shouldShowExternalVideo,
} = this.props;
const { browserName } = browserInfo;
const { osName } = deviceInfo;
@ -168,9 +170,12 @@ class App extends Component {
value: isRTL,
});
const presentationOpen = !(autoSwapLayout || hidePresentation)
|| shouldShowExternalVideo || shouldShowScreenshare;
layoutContextDispatch({
type: ACTIONS.SET_PRESENTATION_IS_OPEN,
value: !(autoSwapLayout || hidePresentation),
value: presentationOpen,
});
Modal.setAppElement('#app');

View File

@ -301,14 +301,23 @@ class PresentationUploader extends Component {
}
});
if (!_.isEqual(prevProps.presentations, propPresentations) || presentations.length === 0) {
this.setState({
presentations: Object.values({
...presentations,
...propPresentations,
}),
});
}
const presState = Object.values({
...propPresentations,
...presentations,
});
const presStateMapped = presState.map((presentation) => {
propPresentations.forEach((propPres) => {
if (propPres.id == presentation.id){
presentation.isCurrent = propPres.isCurrent;
}
})
return presentation;
})
this.setState({
presentations: presStateMapped,
})
}
if (presentations.length > 0) {
@ -857,7 +866,6 @@ class PresentationUploader extends Component {
keyValue={item.id}
onChange={() => this.handleCurrentChange(item.id)}
disabled={disableActions}
animations={animations}
/>
</Styled.ItemAction>
{isRemovable ? (

View File

@ -5,6 +5,7 @@ import Poll from '/imports/api/polls/';
import { makeCall } from '/imports/ui/services/api';
import logger from '/imports/startup/client/logger';
import _ from 'lodash';
import { Random } from 'meteor/random'
const CONVERSION_TIMEOUT = 300000;
const TOKEN_TIMEOUT = 5000;
@ -155,7 +156,6 @@ const requestPresentationUploadToken = (
});
const uploadAndConvertPresentation = (
tmpPresId,
file,
downloadable,
podId,
@ -165,9 +165,9 @@ const uploadAndConvertPresentation = (
onProgress,
onConversion,
) => {
const tmpPresId = _.uniqueId(Random.id(20))
const data = new FormData();
data.append('presentation_name', file.name);
data.append('Filename', file.name);
data.append('fileUpload', file);
data.append('conference', meetingId);
data.append('room', meetingId);
@ -209,7 +209,7 @@ const uploadAndConvertPresentations = (
podId,
uploadEndpoint,
) => Promise.all(presentationsToUpload.map((p) => uploadAndConvertPresentation(
p.id, p.file, p.isDownloadable, podId, meetingId, uploadEndpoint,
p.file, p.isDownloadable, podId, meetingId, uploadEndpoint,
p.onUpload, p.onProgress, p.onConversion,
)));