From 3082c840c868a83037d584102fdca55a2edc1f1d Mon Sep 17 00:00:00 2001 From: Beef Date: Sat, 1 Apr 2023 23:59:58 +0100 Subject: [PATCH] [???] And just like that, it's gone. This reverts commit 748640af56264451deb2814d5621dcba69659bf8. --- src/def.d.ts | 1 - src/index.ts | 6 -- .../settings/components/SettingsSection.tsx | 78 +++++++++---------- src/ui/settings/pages/AssetBrowser.tsx | 5 +- src/ui/settings/pages/Developer.tsx | 2 +- src/ui/settings/pages/General.tsx | 12 +-- src/ui/settings/pages/Plugins.tsx | 4 +- src/ui/settings/pages/Themes.tsx | 4 +- 8 files changed, 43 insertions(+), 69 deletions(-) diff --git a/src/def.d.ts b/src/def.d.ts index f420ae0..90e9e98 100644 --- a/src/def.d.ts +++ b/src/def.d.ts @@ -125,7 +125,6 @@ interface Theme { interface Settings { debuggerUrl: string; developerSettings: boolean; - flip: boolean; } interface ApplicationCommand { diff --git a/src/index.ts b/src/index.ts index a8b19e6..1ef2bc8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,12 +2,10 @@ import { patchLogHook } from "@lib/debug"; import { patchCommands } from "@lib/commands"; import { initPlugins } from "@lib/plugins"; import { patchAssets } from "@ui/assets"; -import { awaitSyncWrapper } from "@lib/storage"; import initSettings from "@ui/settings"; import initFixes from "@lib/fixes"; import logger from "@lib/logger"; import windowObject from "@lib/windowObject"; -import settings from "@lib/settings"; export default async () => { // Load everything in parallel @@ -25,10 +23,6 @@ export default async () => { // Once done, load plugins unloads.push(await initPlugins()); - // :trolley: - await awaitSyncWrapper(settings) - settings.flip ??= true; - // We good :) logger.log("Vendetta is ready!"); } diff --git a/src/ui/settings/components/SettingsSection.tsx b/src/ui/settings/components/SettingsSection.tsx index 7662d91..69d9f3b 100644 --- a/src/ui/settings/components/SettingsSection.tsx +++ b/src/ui/settings/components/SettingsSection.tsx @@ -1,4 +1,4 @@ -import { ReactNative as RN, NavigationNative } from "@metro/common"; +import { NavigationNative } from "@metro/common"; import { ErrorBoundary, Forms } from "@ui/components"; import { getAssetIDByName } from "@ui/assets"; import { useProxy } from "@lib/storage"; @@ -12,45 +12,43 @@ export default function SettingsSection() { return ( - - - } - trailing={FormRow.Arrow} - onPress={() => navigation.push("VendettaSettings")} - /> - - } - trailing={FormRow.Arrow} - onPress={() => navigation.push("VendettaPlugins")} - /> - {window.__vendetta_loader?.features.themes && ( - <> - - } - trailing={FormRow.Arrow} - onPress={() => navigation.push("VendettaThemes")} - /> - - )} - {settings.developerSettings && ( - <> - - } - trailing={FormRow.Arrow} - onPress={() => navigation.push("VendettaDeveloper")} - /> - - )} - - + + } + trailing={FormRow.Arrow} + onPress={() => navigation.push("VendettaSettings")} + /> + + } + trailing={FormRow.Arrow} + onPress={() => navigation.push("VendettaPlugins")} + /> + {window.__vendetta_loader?.features.themes && ( + <> + + } + trailing={FormRow.Arrow} + onPress={() => navigation.push("VendettaThemes")} + /> + + )} + {settings.developerSettings && ( + <> + + } + trailing={FormRow.Arrow} + onPress={() => navigation.push("VendettaDeveloper")} + /> + + )} + ) } \ No newline at end of file diff --git a/src/ui/settings/pages/AssetBrowser.tsx b/src/ui/settings/pages/AssetBrowser.tsx index 55b5b2a..c621ccd 100644 --- a/src/ui/settings/pages/AssetBrowser.tsx +++ b/src/ui/settings/pages/AssetBrowser.tsx @@ -1,8 +1,6 @@ -import { useProxy } from "@/lib/storage"; import { ReactNative as RN, stylesheet } from "@metro/common"; import { all } from "@ui/assets"; import { Forms, Search } from "@ui/components"; -import settings from "@lib/settings"; import ErrorBoundary from "@ui/components/ErrorBoundary"; import AssetDisplay from "@ui/settings/components/AssetDisplay"; @@ -20,11 +18,10 @@ const styles = stylesheet.createThemedStyleSheet({ export default function AssetBrowser() { const [search, setSearch] = React.useState(""); - useProxy(settings); return ( - + setSearch(v)} diff --git a/src/ui/settings/pages/Developer.tsx b/src/ui/settings/pages/Developer.tsx index 96dceea..618df83 100644 --- a/src/ui/settings/pages/Developer.tsx +++ b/src/ui/settings/pages/Developer.tsx @@ -16,7 +16,7 @@ export default function Developer() { return ( - + - + RN.NativeModules.BundleUpdaterManager.reload()} /> - } - value={settings.flip} - onValueChange={(v: boolean) => { - settings.flip = v; - }} - style={{ transform: [{ rotate: "180deg" }] }} - /> } diff --git a/src/ui/settings/pages/Plugins.tsx b/src/ui/settings/pages/Plugins.tsx index 3dbee58..53c4ef3 100644 --- a/src/ui/settings/pages/Plugins.tsx +++ b/src/ui/settings/pages/Plugins.tsx @@ -1,17 +1,15 @@ import { ReactNative as RN } from "@metro/common"; import { useProxy } from "@lib/storage"; import { plugins } from "@lib/plugins"; -import settings from "@lib/settings"; import PluginCard from "@ui/settings/components/PluginCard"; import ErrorBoundary from "@ui/components/ErrorBoundary"; export default function Plugins() { useProxy(plugins); - useProxy(settings) return ( - + } diff --git a/src/ui/settings/pages/Themes.tsx b/src/ui/settings/pages/Themes.tsx index 15f6552..eb58464 100644 --- a/src/ui/settings/pages/Themes.tsx +++ b/src/ui/settings/pages/Themes.tsx @@ -1,17 +1,15 @@ import { themes } from "@/lib/themes"; import { useProxy } from "@lib/storage"; import { ReactNative as RN } from "@metro/common"; -import settings from "@lib/settings"; import ErrorBoundary from "@ui/components/ErrorBoundary"; import ThemeCard from "@ui/settings/components/ThemeCard"; export default function Themes() { useProxy(themes); - useProxy(settings) return ( - + }