Upload and Paste to Upload tweaks

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2020-06-01 15:00:55 +01:00
parent 419857c29c
commit 7b2f2daf2c
3 changed files with 15 additions and 11 deletions

View file

@ -399,7 +399,12 @@ export default class ContentMessages {
if (!shouldUpload) return;
}
await this.ensureMediaConfigFetched();
if (!this.mediaConfig) { // hot-path optimization to not flash a spinner if we don't need to
const Loader = sdk.getComponent("elements.Spinner");
const modal = Modal.createDialog(Loader, null, 'mx_Dialog_spinner');
await this.ensureMediaConfigFetched();
modal.close();
}
const tooBigFiles = [];
const okFiles = [];