From 5c5b009c4180b73603a9c3a6c6663f889a2e2062 Mon Sep 17 00:00:00 2001 From: V Date: Fri, 12 May 2023 01:40:43 +0200 Subject: Settings: Fix resetting scroll/search when getting a ping (#1106) --- src/plugins/settings.tsx | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/settings.tsx b/src/plugins/settings.tsx index c1dd315..2201ece 100644 --- a/src/plugins/settings.tsx +++ b/src/plugins/settings.tsx @@ -18,17 +18,13 @@ import { addContextMenuPatch } from "@api/ContextMenu"; import { Settings } from "@api/Settings"; -import PatchHelper from "@components/PatchHelper"; import { Devs } from "@utils/constants"; import { Logger } from "@utils/Logger"; -import { LazyComponent } from "@utils/react"; import definePlugin, { OptionType } from "@utils/types"; -import { SettingsRouter } from "@webpack/common"; +import { React, SettingsRouter } from "@webpack/common"; import gitHash from "~git-hash"; -const SettingsComponent = LazyComponent(() => require("../components/VencordSettings").default); - export default definePlugin({ name: "Settings", description: "Adds Settings UI and debug info", @@ -95,37 +91,37 @@ export default definePlugin({ { section: "VencordSettings", label: "Vencord", - element: () => + element: require("@components/VencordSettings/VencordTab").default }, { section: "VencordPlugins", label: "Plugins", - element: () => , + element: require("@components/VencordSettings/PluginsTab").default, }, { section: "VencordThemes", label: "Themes", - element: () => , + element: require("@components/VencordSettings/ThemesTab").default, }, !IS_WEB && { section: "VencordUpdater", label: "Updater", - element: () => , + element: require("@components/VencordSettings/UpdaterTab").default, }, { section: "VencordCloud", label: "Cloud", - element: () => , + element: require("@components/VencordSettings/CloudTab").default, }, { section: "VencordSettingsSync", label: "Backup & Restore", - element: () => , + element: require("@components/VencordSettings/BackupAndRestoreTab").default, }, IS_DEV && { section: "VencordPatchHelper", label: "Patch Helper", - element: PatchHelper!, + element: require("@components/VencordSettings/PatchHelperTab").default, }, IS_VENCORD_DESKTOP && { section: "VencordDesktop", -- cgit