From 19e8fa01f2c3411302eb825c0a4927f413041c9f Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 1 Jun 2020 17:05:53 +0100 Subject: [PATCH] use import instead of getComponent Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/ContentMessages.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ContentMessages.tsx b/src/ContentMessages.tsx index cc08859e78..249ad8381c 100644 --- a/src/ContentMessages.tsx +++ b/src/ContentMessages.tsx @@ -27,6 +27,7 @@ import Modal from './Modal'; import RoomViewStore from './stores/RoomViewStore'; import encrypt from "browser-encrypt-attachment"; import extractPngChunks from "png-chunks-extract"; +import Spinner from "./components/views/elements/Spinner"; // Polyfill for Canvas.toBlob API using Canvas.toDataURL import "blueimp-canvas-to-blob"; @@ -400,8 +401,7 @@ export default class ContentMessages { } 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'); + const modal = Modal.createDialog(Spinner, null, 'mx_Dialog_spinner'); await this.ensureMediaConfigFetched(); modal.close(); }