Remove the Lazy Loading InvalidStoreError
Dialogs (#12358)
* remove the LL dialogs and the use of InvalidStoreError * remove strings
This commit is contained in:
parent
4a182e89b0
commit
ac62ce3e6c
5 changed files with 2 additions and 153 deletions
|
@ -19,7 +19,6 @@ limitations under the License.
|
|||
|
||||
import { ReactNode } from "react";
|
||||
import { createClient, MatrixClient, SSOAction, OidcTokenRefresher } from "matrix-js-sdk/src/matrix";
|
||||
import { InvalidStoreError } from "matrix-js-sdk/src/errors";
|
||||
import { IEncryptedPayload } from "matrix-js-sdk/src/crypto/aes";
|
||||
import { QueryDict } from "matrix-js-sdk/src/utils";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
@ -52,8 +51,6 @@ import LegacyCallHandler from "./LegacyCallHandler";
|
|||
import LifecycleCustomisations from "./customisations/Lifecycle";
|
||||
import ErrorDialog from "./components/views/dialogs/ErrorDialog";
|
||||
import { _t } from "./languageHandler";
|
||||
import LazyLoadingResyncDialog from "./components/views/dialogs/LazyLoadingResyncDialog";
|
||||
import LazyLoadingDisabledDialog from "./components/views/dialogs/LazyLoadingDisabledDialog";
|
||||
import SessionRestoreErrorDialog from "./components/views/dialogs/SessionRestoreErrorDialog";
|
||||
import StorageEvictedDialog from "./components/views/dialogs/StorageEvictedDialog";
|
||||
import { setSentryUser } from "./sentry";
|
||||
|
@ -439,39 +436,6 @@ async function onFailedDelegatedAuthLogin(description: string | ReactNode, tryAg
|
|||
});
|
||||
}
|
||||
|
||||
export function handleInvalidStoreError(e: InvalidStoreError): Promise<void> | void {
|
||||
if (e.reason === InvalidStoreError.TOGGLED_LAZY_LOADING) {
|
||||
return Promise.resolve()
|
||||
.then(() => {
|
||||
const lazyLoadEnabled = e.value;
|
||||
if (lazyLoadEnabled) {
|
||||
return new Promise<void>((resolve) => {
|
||||
Modal.createDialog(LazyLoadingResyncDialog, {
|
||||
onFinished: resolve,
|
||||
});
|
||||
});
|
||||
} else {
|
||||
// show warning about simultaneous use
|
||||
// between LL/non-LL version on same host.
|
||||
// as disabling LL when previously enabled
|
||||
// is a strong indicator of this (/develop & /app)
|
||||
return new Promise<void>((resolve) => {
|
||||
Modal.createDialog(LazyLoadingDisabledDialog, {
|
||||
onFinished: resolve,
|
||||
host: window.location.host,
|
||||
});
|
||||
});
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
return MatrixClientPeg.safeGet().store.deleteAllData();
|
||||
})
|
||||
.then(() => {
|
||||
PlatformPeg.get()?.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function registerAsGuest(hsUrl: string, isUrl?: string, defaultDeviceDisplayName?: string): Promise<boolean> {
|
||||
logger.log(`Doing guest login on ${hsUrl}`);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue