Move DeviceListener into the device-listener directory (#32434)
* Move DeviceListener into the device-listener dir * Provide device-listener/index.ts
This commit is contained in:
@@ -25,7 +25,7 @@ import {
|
||||
} from "matrix-js-sdk/src/crypto-api";
|
||||
import { type CryptoSessionStateChange } from "@matrix-org/analytics-events/types/typescript/CryptoSessionStateChange";
|
||||
|
||||
import DeviceListener from "../../src/DeviceListener";
|
||||
import { DeviceListener, BACKUP_DISABLED_ACCOUNT_DATA_KEY } from "../../src/device-listener";
|
||||
import { MatrixClientPeg } from "../../src/MatrixClientPeg";
|
||||
import * as SetupEncryptionToast from "../../src/toasts/SetupEncryptionToast";
|
||||
import * as UnverifiedSessionToast from "../../src/toasts/UnverifiedSessionToast";
|
||||
@@ -37,7 +37,6 @@ import { SettingLevel } from "../../src/settings/SettingLevel";
|
||||
import { getMockClientWithEventEmitter, mockPlatformPeg } from "../test-utils";
|
||||
import { isBulkUnverifiedDeviceReminderSnoozed } from "../../src/utils/device/snoozeBulkUnverifiedDeviceReminder";
|
||||
import { PosthogAnalytics } from "../../src/PosthogAnalytics";
|
||||
import { BACKUP_DISABLED_ACCOUNT_DATA_KEY } from "../../src/device-listener/DeviceListenerCurrentDevice";
|
||||
|
||||
jest.mock("../../src/dispatcher/dispatcher", () => ({
|
||||
dispatch: jest.fn(),
|
||||
|
||||
@@ -16,7 +16,7 @@ import { createTestClient, withClientContextRenderOptions } from "../../../../..
|
||||
import { copyPlaintext } from "../../../../../../src/utils/strings";
|
||||
import Modal from "../../../../../../src/Modal";
|
||||
import ErrorDialog from "../../../../../../src/components/views/dialogs/ErrorDialog";
|
||||
import DeviceListener from "../../../../../../src/DeviceListener";
|
||||
import { DeviceListener } from "../../../../../../src/device-listener";
|
||||
|
||||
jest.mock("../../../../../../src/utils/strings", () => ({
|
||||
copyPlaintext: jest.fn(),
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ import { type MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { RecoveryPanelOutOfSync } from "../../../../../../src/components/views/settings/encryption/RecoveryPanelOutOfSync";
|
||||
import { AccessCancelledError, accessSecretStorage } from "../../../../../../src/SecurityManager";
|
||||
import DeviceListener from "../../../../../../src/DeviceListener";
|
||||
import { DeviceListener } from "../../../../../../src/device-listener";
|
||||
import { createTestClient, withClientContextRenderOptions } from "../../../../../test-utils";
|
||||
|
||||
jest.mock("../../../../../../src/SecurityManager", () => {
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ import {
|
||||
} from "../../../../../../../src/components/views/settings/tabs/user/EncryptionUserSettingsTab";
|
||||
import { createTestClient, withClientContextRenderOptions } from "../../../../../../test-utils";
|
||||
import Modal from "../../../../../../../src/Modal";
|
||||
import DeviceListener from "../../../../../../../src/DeviceListener";
|
||||
import { DeviceListener } from "../../../../../../../src/device-listener";
|
||||
|
||||
describe("<EncryptionUserSettingsTab />", () => {
|
||||
let matrixClient: MatrixClient;
|
||||
|
||||
@@ -17,7 +17,7 @@ import * as SecurityManager from "../../../src/SecurityManager";
|
||||
import ToastContainer from "../../../src/components/structures/ToastContainer";
|
||||
import { showToast } from "../../../src/toasts/SetupEncryptionToast";
|
||||
import dis from "../../../src/dispatcher/dispatcher";
|
||||
import DeviceListener from "../../../src/DeviceListener";
|
||||
import { DeviceListener } from "../../../src/device-listener";
|
||||
import Modal from "../../../src/Modal";
|
||||
import ConfirmKeyStorageOffDialog from "../../../src/components/views/dialogs/ConfirmKeyStorageOffDialog";
|
||||
import SetupEncryptionDialog from "../../../src/components/views/dialogs/security/SetupEncryptionDialog";
|
||||
|
||||
@@ -18,7 +18,7 @@ import { showToast } from "../../../src/toasts/UnverifiedSessionToast";
|
||||
import { filterConsole, flushPromises, stubClient } from "../../test-utils";
|
||||
import ToastContainer from "../../../src/components/structures/ToastContainer";
|
||||
import { Action } from "../../../src/dispatcher/actions";
|
||||
import DeviceListener from "../../../src/DeviceListener";
|
||||
import { DeviceListener } from "../../../src/device-listener";
|
||||
|
||||
describe("UnverifiedSessionToast", () => {
|
||||
const otherDevice: IMyDevice = {
|
||||
|
||||
Reference in New Issue
Block a user