diff options
Diffstat (limited to 'src/components/PluginSettings/index.tsx')
-rw-r--r-- | src/components/PluginSettings/index.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/components/PluginSettings/index.tsx b/src/components/PluginSettings/index.tsx index 5a367c8..7679c01 100644 --- a/src/components/PluginSettings/index.tsx +++ b/src/components/PluginSettings/index.tsx @@ -20,7 +20,7 @@ import "./styles.css"; import * as DataStore from "@api/DataStore"; import { showNotice } from "@api/Notices"; -import { useSettings } from "@api/settings"; +import { useSettings } from "@api/Settings"; import { classNameFactory } from "@api/Styles"; import ErrorBoundary from "@components/ErrorBoundary"; import { Flex } from "@components/Flex"; @@ -29,11 +29,12 @@ import { Badge } from "@components/PluginSettings/components"; import PluginModal from "@components/PluginSettings/PluginModal"; import { Switch } from "@components/Switch"; import { ChangeList } from "@utils/ChangeList"; -import Logger from "@utils/Logger"; +import { Logger } from "@utils/Logger"; import { Margins } from "@utils/margins"; -import { classes, LazyComponent, useAwaiter } from "@utils/misc"; +import { classes } from "@utils/misc"; import { openModalLazy } from "@utils/modal"; import { onlyOnce } from "@utils/onlyOnce"; +import { LazyComponent, useAwaiter } from "@utils/react"; import { Plugin } from "@utils/types"; import { findByCode, findByPropsLazy } from "@webpack"; import { Alerts, Button, Card, Forms, Parser, React, Select, Text, TextInput, Toasts, Tooltip } from "@webpack/common"; @@ -126,7 +127,7 @@ function PluginCard({ plugin, disabled, onRestartNeeded, onMouseEnter, onMouseLe } // if the plugin has patches, dont use stopPlugin/startPlugin. Wait for restart to apply changes. - if (plugin.patches) { + if (plugin.patches?.length) { settings.enabled = !wasEnabled; onRestartNeeded(plugin.name); return; |