From 8d2720d41753fca63387a68c6a5a48112b2943b3 Mon Sep 17 00:00:00 2001 From: kmmiio99o Date: Wed, 1 Oct 2025 20:30:08 +0200 Subject: [PATCH] EXPLODO --- plugins/Commands/settings.tsx | 55 ++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 11 deletions(-) diff --git a/plugins/Commands/settings.tsx b/plugins/Commands/settings.tsx index cdc188c..3c31aff 100644 --- a/plugins/Commands/settings.tsx +++ b/plugins/Commands/settings.tsx @@ -160,9 +160,10 @@ function Header() { ); } -// Facts Commands Settings Page - SIMPLIFIED +// Facts Commands Settings Page - FIXED with local force update function FactsSettingsPage() { useProxy(storage); + const [, forceUpdate] = React.useReducer((x) => x + 1, 0); return ( @@ -197,6 +198,7 @@ function FactsSettingsPage() { onValueChange={(v) => { storage.enabledCommands.catfact = v; storage.pendingRestart = true; + forceUpdate(); // Force this page to re-render }} /> { storage.enabledCommands.dogfact = v; storage.pendingRestart = true; + forceUpdate(); // Force this page to re-render }} /> { storage.enabledCommands.useless = v; storage.pendingRestart = true; + forceUpdate(); // Force this page to re-render }} /> @@ -225,9 +229,10 @@ function FactsSettingsPage() { ); } -// Gary API Settings Page - SIMPLIFIED with working radio buttons +// Gary API Settings Page - FIXED with local force update function GaryAPIPage() { useProxy(storage); + const [, forceUpdate] = React.useReducer((x) => x + 1, 0); const styles = stylesheet.createThemedStyleSheet({ container: { @@ -262,6 +267,7 @@ function GaryAPIPage() { onValueChange={(v) => { storage.enabledCommands.gary = v; storage.pendingRestart = true; + forceUpdate(); // Force this page to re-render }} /> @@ -279,7 +285,10 @@ function GaryAPIPage() { leading={} value={currentSource === "gary"} onValueChange={(v) => { - if (v) storage.garySettings.imageSource = "gary"; + if (v) { + storage.garySettings.imageSource = "gary"; + forceUpdate(); // Force this page to re-render + } }} /> } value={currentSource === "catapi"} onValueChange={(v) => { - if (v) storage.garySettings.imageSource = "catapi"; + if (v) { + storage.garySettings.imageSource = "catapi"; + forceUpdate(); // Force this page to re-render + } }} /> } value={currentSource === "minker"} onValueChange={(v) => { - if (v) storage.garySettings.imageSource = "minker"; + if (v) { + storage.garySettings.imageSource = "minker"; + forceUpdate(); // Force this page to re-render + } }} /> } value={currentSource === "goober"} onValueChange={(v) => { - if (v) storage.garySettings.imageSource = "goober"; + if (v) { + storage.garySettings.imageSource = "goober"; + forceUpdate(); // Force this page to re-render + } }} /> @@ -326,9 +344,10 @@ function GaryAPIPage() { ); } -// Simple List Settings Page +// List Settings Page - FIXED with local force update function ListSettingsPage() { useProxy(storage); + const [, forceUpdate] = React.useReducer((x) => x + 1, 0); return ( @@ -363,6 +382,7 @@ function ListSettingsPage() { onValueChange={(v) => { storage.enabledCommands.pluginList = v; storage.pendingRestart = true; + forceUpdate(); // Force this page to re-render }} /> { storage.enabledCommands.themeList = v; storage.pendingRestart = true; + forceUpdate(); // Force this page to re-render }} /> @@ -381,9 +402,10 @@ function ListSettingsPage() { ); } -// Simple Image Settings Page +// Image Settings Page - FIXED with local force update function ImageSettingsPage() { useProxy(storage); + const [, forceUpdate] = React.useReducer((x) => x + 1, 0); return ( @@ -397,6 +419,7 @@ function ImageSettingsPage() { onValueChange={(v) => { storage.enabledCommands.petpet = v; storage.pendingRestart = true; + forceUpdate(); // Force this page to re-render }} /> @@ -410,6 +433,7 @@ function ImageSettingsPage() { onValueChange={(v) => { storage.enabledCommands.konoself = v; storage.pendingRestart = true; + forceUpdate(); // Force this page to re-render }} /> { storage.enabledCommands.konosend = v; storage.pendingRestart = true; + forceUpdate(); // Force this page to re-render }} /> @@ -428,9 +453,10 @@ function ImageSettingsPage() { ); } -// Simple Spotify Settings Page +// Spotify Settings Page - FIXED with local force update function SpotifySettingsPage() { useProxy(storage); + const [, forceUpdate] = React.useReducer((x) => x + 1, 0); return ( @@ -444,6 +470,7 @@ function SpotifySettingsPage() { onValueChange={(v) => { storage.enabledCommands.spotifyTrack = v; storage.pendingRestart = true; + forceUpdate(); // Force this page to re-render }} /> { storage.enabledCommands.spotifyAlbum = v; storage.pendingRestart = true; + forceUpdate(); // Force this page to re-render }} /> { storage.enabledCommands.spotifyArtists = v; storage.pendingRestart = true; + forceUpdate(); // Force this page to re-render }} /> { storage.enabledCommands.spotifyCover = v; storage.pendingRestart = true; + forceUpdate(); // Force this page to re-render }} /> @@ -493,9 +523,10 @@ function SpotifySettingsPage() { ); } -// Simple Other Settings Page +// Other Settings Page - FIXED with local force update function OtherSettingsPage() { useProxy(storage); + const [, forceUpdate] = React.useReducer((x) => x + 1, 0); return ( @@ -509,6 +540,7 @@ function OtherSettingsPage() { onValueChange={(v) => { storage.enabledCommands.firstmessage = v; storage.pendingRestart = true; + forceUpdate(); // Force this page to re-render }} /> @@ -522,6 +554,7 @@ function OtherSettingsPage() { onValueChange={(v) => { storage.enabledCommands.sysinfo = v; storage.pendingRestart = true; + forceUpdate(); // Force this page to re-render }} /> @@ -689,7 +722,7 @@ function CreditsPage() { ); } -// MAIN SETTINGS COMPONENT - ULTRA SIMPLIFIED +// MAIN SETTINGS COMPONENT export default function Settings() { useProxy(storage); const navigation = NavigationNative.useNavigation();