From aeb45eabbab57b1326c182862995e1dd53a2ee73 Mon Sep 17 00:00:00 2001 From: John Tore Simonsen Date: Tue, 15 Oct 2024 09:39:08 +0200 Subject: [PATCH] run eslint --- src/components/structures/MatrixChat.tsx | 6 +----- src/components/views/dialogs/InviteDialog.tsx | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx index 30087493466..aa1af9217f4 100644 --- a/src/components/structures/MatrixChat.tsx +++ b/src/components/structures/MatrixChat.tsx @@ -32,13 +32,9 @@ import { logger } from "matrix-js-sdk/src/logger"; import { throttle } from "lodash"; import { CryptoEvent } from "matrix-js-sdk/src/crypto"; import { IKeyBackupInfo } from "matrix-js-sdk/src/crypto/keybackup"; + // what-input helps improve keyboard accessibility import "what-input"; -import { - CustomComponentLifecycle, - CustomComponentOpts, -} from "@matrix-org/react-sdk-module-api/lib/lifecycles/CustomComponentLifecycle"; - import type NewRecoveryMethodDialog from "../../async-components/views/dialogs/security/NewRecoveryMethodDialog"; import type RecoveryMethodRemovedDialog from "../../async-components/views/dialogs/security/RecoveryMethodRemovedDialog"; import PosthogTrackers from "../../PosthogTrackers"; diff --git a/src/components/views/dialogs/InviteDialog.tsx b/src/components/views/dialogs/InviteDialog.tsx index 6d1f1a8998d..406c1a30a0f 100644 --- a/src/components/views/dialogs/InviteDialog.tsx +++ b/src/components/views/dialogs/InviteDialog.tsx @@ -20,6 +20,11 @@ import { RoomMember, Room, MatrixError, EventType } from "matrix-js-sdk/src/matr import { MatrixCall } from "matrix-js-sdk/src/webrtc/call"; import { logger } from "matrix-js-sdk/src/logger"; import { uniqBy } from "lodash"; +import { + CustomComponentLifecycle, + CustomComponentOpts, +} from "@matrix-org/react-sdk-module-api/lib/lifecycles/CustomComponentLifecycle"; +import { KnownMembership } from "matrix-js-sdk/src/types"; import { Icon as InfoIcon } from "../../../../res/img/element-icons/info.svg"; import { Icon as EmailPillAvatarIcon } from "../../../../res/img/icon-email-pill-avatar.svg"; @@ -27,7 +32,7 @@ import { _t, _td } from "../../../languageHandler"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; import { makeRoomPermalink, makeUserPermalink } from "../../../utils/permalinks/Permalinks"; import DMRoomMap from "../../../utils/DMRoomMap"; -import SdkConfig from "../../../SdkConfig"; +// import SdkConfig from "../../../SdkConfig"; import * as Email from "../../../email"; import { getDefaultIdentityServerUrl, setToDefaultIdentityServer } from "../../../utils/IdentityServerUtils"; import { buildActivityScores, buildMemberScores, compareMembers } from "../../../utils/SortMembers"; @@ -74,7 +79,6 @@ import { UNKNOWN_PROFILE_ERRORS } from "../../../utils/MultiInviter"; import AskInviteAnywayDialog, { UnknownProfiles } from "./AskInviteAnywayDialog"; import { SdkContextClass } from "../../../contexts/SDKContext"; import { UserProfilesStore } from "../../../stores/UserProfilesStore"; -import { CustomComponentLifecycle, CustomComponentOpts } from "@matrix-org/react-sdk-module-api/lib/lifecycles/CustomComponentLifecycle"; import { ModuleRunner } from "../../../modules/ModuleRunner"; // we have a number of types defined from the Matrix spec which can't reasonably be altered here. @@ -371,8 +375,8 @@ export default class InviteDialog extends React.PureComponent <>; - ModuleRunner.instance.invoke( - CustomComponentLifecycle.InviteDialog, - customInviteDialog as CustomComponentOpts, - ); + ModuleRunner.instance.invoke(CustomComponentLifecycle.InviteDialog, customInviteDialog as CustomComponentOpts); return ( {/* VERJI: Workaround, pass needed props in a child element of the customComponent wrapper, so we can extract in module implementation */} @@ -1584,4 +1585,4 @@ export default class InviteDialog extends React.PureComponent ); } -} \ No newline at end of file +}