only get component when needed

This commit is contained in:
Bruno Windels 2018-09-26 16:30:35 +01:00
parent 824ad5e318
commit 130f3cc2ff

View file

@ -240,11 +240,11 @@ function _handleLoadSessionFailure(e) {
if (e instanceof Matrix.InvalidStoreError) { if (e instanceof Matrix.InvalidStoreError) {
if (e.reason === Matrix.InvalidStoreError.TOGGLED_LAZY_LOADING) { if (e.reason === Matrix.InvalidStoreError.TOGGLED_LAZY_LOADING) {
const LazyLoadingResyncDialog =
sdk.getComponent("views.dialogs.LazyLoadingResyncDialog");
return Promise.resolve().then(() => { return Promise.resolve().then(() => {
const lazyLoadEnabled = e.value; const lazyLoadEnabled = e.value;
if (lazyLoadEnabled) { if (lazyLoadEnabled) {
const LazyLoadingResyncDialog =
sdk.getComponent("views.dialogs.LazyLoadingResyncDialog");
return new Promise((resolve) => { return new Promise((resolve) => {
Modal.createDialog(LazyLoadingResyncDialog, { Modal.createDialog(LazyLoadingResyncDialog, {
onFinished: resolve, onFinished: resolve,