From fdd98bbf3f2a13f7959fac3060e752a40c9c3df5 Mon Sep 17 00:00:00 2001 From: Germain Souquet Date: Tue, 20 Jul 2021 09:36:33 +0200 Subject: [PATCH] linter fix --- src/@types/global.d.ts | 1 + .../dialogs/eventindex/DisableEventIndexDialog.tsx | 10 ++++------ .../dialogs/eventindex/ManageEventIndexDialog.tsx | 5 +++-- src/components/views/auth/CountryDropdown.tsx | 1 - 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/@types/global.d.ts b/src/@types/global.d.ts index 7f78d96642..50cfa745a4 100644 --- a/src/@types/global.d.ts +++ b/src/@types/global.d.ts @@ -91,6 +91,7 @@ declare global { mxSetupEncryptionStore?: SetupEncryptionStore; mxRoomScrollStateStore?: RoomScrollStateStore; grecaptcha: any; + // eslint-disable-next-line mx_on_recaptcha_loaded: () => void; } diff --git a/src/async-components/views/dialogs/eventindex/DisableEventIndexDialog.tsx b/src/async-components/views/dialogs/eventindex/DisableEventIndexDialog.tsx index 2be5ddaa43..3088cbfdf4 100644 --- a/src/async-components/views/dialogs/eventindex/DisableEventIndexDialog.tsx +++ b/src/async-components/views/dialogs/eventindex/DisableEventIndexDialog.tsx @@ -15,7 +15,10 @@ limitations under the License. */ import React from 'react'; -import * as sdk from '../../../../index'; + +import BaseDialog from "../../../../components/views/dialogs/BaseDialog"; +import Spinner from "../../../../components/views/elements/Spinner"; +import DialogButtons from "../../../../components/views/elements/DialogButtons"; import dis from "../../../../dispatcher/dispatcher"; import { _t } from '../../../../languageHandler'; @@ -23,7 +26,6 @@ import SettingsStore from "../../../../settings/SettingsStore"; import EventIndexPeg from "../../../../indexing/EventIndexPeg"; import { Action } from "../../../../dispatcher/actions"; import { SettingLevel } from "../../../../settings/SettingLevel"; - interface IProps { onFinished: (success: boolean) => void; } @@ -55,10 +57,6 @@ export default class DisableEventIndexDialog extends React.Component {_t("If disabled, messages from encrypted rooms won't appear in search results.")} diff --git a/src/async-components/views/dialogs/eventindex/ManageEventIndexDialog.tsx b/src/async-components/views/dialogs/eventindex/ManageEventIndexDialog.tsx index c5c8022346..8a11ff4b1b 100644 --- a/src/async-components/views/dialogs/eventindex/ManageEventIndexDialog.tsx +++ b/src/async-components/views/dialogs/eventindex/ManageEventIndexDialog.tsx @@ -134,8 +134,9 @@ export default class ManageEventIndexDialog extends React.Component { - Modal.createTrackedDialogAsync("Disable message search", "Disable message search", - import("./DisableEventIndexDialog"), + const DisableEventIndexDialog = (await import("./DisableEventIndexDialog")).default; + Modal.createTrackedDialog("Disable message search", "Disable message search", + DisableEventIndexDialog, null, null, /* priority = */ false, /* static = */ true, ); }; diff --git a/src/components/views/auth/CountryDropdown.tsx b/src/components/views/auth/CountryDropdown.tsx index e0eed5b430..a97222b5e4 100644 --- a/src/components/views/auth/CountryDropdown.tsx +++ b/src/components/views/auth/CountryDropdown.tsx @@ -15,7 +15,6 @@ limitations under the License. */ import React from 'react'; -import PropTypes from 'prop-types'; import * as sdk from '../../../index';