[???] And just like that, it's gone.

This reverts commit 748640af56.
This commit is contained in:
Beef 2023-04-01 23:59:58 +01:00
parent 21fc6e86a8
commit 3082c840c8
8 changed files with 43 additions and 69 deletions

1
src/def.d.ts vendored
View file

@ -125,7 +125,6 @@ interface Theme {
interface Settings { interface Settings {
debuggerUrl: string; debuggerUrl: string;
developerSettings: boolean; developerSettings: boolean;
flip: boolean;
} }
interface ApplicationCommand { interface ApplicationCommand {

View file

@ -2,12 +2,10 @@ import { patchLogHook } from "@lib/debug";
import { patchCommands } from "@lib/commands"; import { patchCommands } from "@lib/commands";
import { initPlugins } from "@lib/plugins"; import { initPlugins } from "@lib/plugins";
import { patchAssets } from "@ui/assets"; import { patchAssets } from "@ui/assets";
import { awaitSyncWrapper } from "@lib/storage";
import initSettings from "@ui/settings"; import initSettings from "@ui/settings";
import initFixes from "@lib/fixes"; import initFixes from "@lib/fixes";
import logger from "@lib/logger"; import logger from "@lib/logger";
import windowObject from "@lib/windowObject"; import windowObject from "@lib/windowObject";
import settings from "@lib/settings";
export default async () => { export default async () => {
// Load everything in parallel // Load everything in parallel
@ -25,10 +23,6 @@ export default async () => {
// Once done, load plugins // Once done, load plugins
unloads.push(await initPlugins()); unloads.push(await initPlugins());
// :trolley:
await awaitSyncWrapper(settings)
settings.flip ??= true;
// We good :) // We good :)
logger.log("Vendetta is ready!"); logger.log("Vendetta is ready!");
} }

View file

@ -1,4 +1,4 @@
import { ReactNative as RN, NavigationNative } from "@metro/common"; import { NavigationNative } from "@metro/common";
import { ErrorBoundary, Forms } from "@ui/components"; import { ErrorBoundary, Forms } from "@ui/components";
import { getAssetIDByName } from "@ui/assets"; import { getAssetIDByName } from "@ui/assets";
import { useProxy } from "@lib/storage"; import { useProxy } from "@lib/storage";
@ -12,7 +12,6 @@ export default function SettingsSection() {
return ( return (
<ErrorBoundary> <ErrorBoundary>
<RN.View style={settings.flip && { transform: [{ rotate: "180deg" }] }}>
<FormSection key="Vendetta" title="Vendetta"> <FormSection key="Vendetta" title="Vendetta">
<FormRow <FormRow
label="General" label="General"
@ -50,7 +49,6 @@ export default function SettingsSection() {
</> </>
)} )}
</FormSection> </FormSection>
</RN.View>
</ErrorBoundary> </ErrorBoundary>
) )
} }

View file

@ -1,8 +1,6 @@
import { useProxy } from "@/lib/storage";
import { ReactNative as RN, stylesheet } from "@metro/common"; import { ReactNative as RN, stylesheet } from "@metro/common";
import { all } from "@ui/assets"; import { all } from "@ui/assets";
import { Forms, Search } from "@ui/components"; import { Forms, Search } from "@ui/components";
import settings from "@lib/settings";
import ErrorBoundary from "@ui/components/ErrorBoundary"; import ErrorBoundary from "@ui/components/ErrorBoundary";
import AssetDisplay from "@ui/settings/components/AssetDisplay"; import AssetDisplay from "@ui/settings/components/AssetDisplay";
@ -20,11 +18,10 @@ const styles = stylesheet.createThemedStyleSheet({
export default function AssetBrowser() { export default function AssetBrowser() {
const [search, setSearch] = React.useState(""); const [search, setSearch] = React.useState("");
useProxy(settings);
return ( return (
<ErrorBoundary> <ErrorBoundary>
<RN.View style={{ flex: 1, ...(settings.flip && { transform: [{ rotate: "180deg" }] }) }}> <RN.View style={{ flex: 1 }}>
<Search <Search
style={styles.search} style={styles.search}
onChangeText={(v: string) => setSearch(v)} onChangeText={(v: string) => setSearch(v)}

View file

@ -16,7 +16,7 @@ export default function Developer() {
return ( return (
<ErrorBoundary> <ErrorBoundary>
<RN.ScrollView style={{ flex: 1, ...(settings.flip && { transform: [{ rotate: "180deg" }] }) }} contentContainerStyle={{ paddingBottom: 38 }}> <RN.ScrollView style={{ flex: 1 }} contentContainerStyle={{ paddingBottom: 38 }}>
<FormSection title="Debug" titleStyleType="no_border"> <FormSection title="Debug" titleStyleType="no_border">
<FormInput <FormInput
value={settings.debuggerUrl} value={settings.debuggerUrl}

View file

@ -82,7 +82,7 @@ export default function General() {
return ( return (
<ErrorBoundary> <ErrorBoundary>
<RN.ScrollView style={{ flex: 1, ...(settings.flip && { transform: [{ rotate: "180deg" }] }) }} contentContainerStyle={{ paddingBottom: 38 }}> <RN.ScrollView style={{ flex: 1 }} contentContainerStyle={{ paddingBottom: 38 }}>
<FormSection title="Links" titleStyleType="no_border"> <FormSection title="Links" titleStyleType="no_border">
<FormRow <FormRow
label="Discord Server" label="Discord Server"
@ -105,16 +105,6 @@ export default function General() {
onPress={() => RN.NativeModules.BundleUpdaterManager.reload()} onPress={() => RN.NativeModules.BundleUpdaterManager.reload()}
/> />
<FormDivider /> <FormDivider />
<FormSwitchRow
label="Flip UI"
subLabel="April Fools!"
leading={<FormRow.Icon source={getAssetIDByName("ic_emoji_24px")} />}
value={settings.flip}
onValueChange={(v: boolean) => {
settings.flip = v;
}}
style={{ transform: [{ rotate: "180deg" }] }}
/>
<FormSwitchRow <FormSwitchRow
label="Developer Settings" label="Developer Settings"
leading={<FormRow.Icon source={getAssetIDByName("ic_progress_wrench_24px")} />} leading={<FormRow.Icon source={getAssetIDByName("ic_progress_wrench_24px")} />}

View file

@ -1,17 +1,15 @@
import { ReactNative as RN } from "@metro/common"; import { ReactNative as RN } from "@metro/common";
import { useProxy } from "@lib/storage"; import { useProxy } from "@lib/storage";
import { plugins } from "@lib/plugins"; import { plugins } from "@lib/plugins";
import settings from "@lib/settings";
import PluginCard from "@ui/settings/components/PluginCard"; import PluginCard from "@ui/settings/components/PluginCard";
import ErrorBoundary from "@ui/components/ErrorBoundary"; import ErrorBoundary from "@ui/components/ErrorBoundary";
export default function Plugins() { export default function Plugins() {
useProxy(plugins); useProxy(plugins);
useProxy(settings)
return ( return (
<ErrorBoundary> <ErrorBoundary>
<RN.View style={{ flex: 1, ...(settings.flip && { transform: [{ rotate: "180deg" }] }) }}> <RN.View style={{ flex: 1 }}>
<RN.FlatList <RN.FlatList
data={Object.values(plugins)} data={Object.values(plugins)}
renderItem={({ item, index }) => <PluginCard plugin={item} index={index} />} renderItem={({ item, index }) => <PluginCard plugin={item} index={index} />}

View file

@ -1,17 +1,15 @@
import { themes } from "@/lib/themes"; import { themes } from "@/lib/themes";
import { useProxy } from "@lib/storage"; import { useProxy } from "@lib/storage";
import { ReactNative as RN } from "@metro/common"; import { ReactNative as RN } from "@metro/common";
import settings from "@lib/settings";
import ErrorBoundary from "@ui/components/ErrorBoundary"; import ErrorBoundary from "@ui/components/ErrorBoundary";
import ThemeCard from "@ui/settings/components/ThemeCard"; import ThemeCard from "@ui/settings/components/ThemeCard";
export default function Themes() { export default function Themes() {
useProxy(themes); useProxy(themes);
useProxy(settings)
return ( return (
<ErrorBoundary> <ErrorBoundary>
<RN.View style={{ flex: 1, ...(settings.flip && { transform: [{ rotate: "180deg" }] }) }}> <RN.View style={{ flex: 1 }}>
<RN.FlatList <RN.FlatList
data={Object.values(themes)} data={Object.values(themes)}
renderItem={({ item, index }) => <ThemeCard theme={item} index={index} />} renderItem={({ item, index }) => <ThemeCard theme={item} index={index} />}