diff options
| author | xXJSONDeruloXx <danielhimebauch@gmail.com> | 2025-08-16 12:27:11 -0400 |
|---|---|---|
| committer | xXJSONDeruloXx <danielhimebauch@gmail.com> | 2025-08-16 12:27:11 -0400 |
| commit | 149ecf2d8bf5eaacb2e71d7006d3b38f15b91104 (patch) | |
| tree | d31098154dabce3d12fd949501f6ffd7c376a3c9 | |
| parent | f493e25698427a933a38bdacb314c3da7672df55 (diff) | |
| download | decky-lsfg-vk-149ecf2d8bf5eaacb2e71d7006d3b38f15b91104.tar.gz decky-lsfg-vk-149ecf2d8bf5eaacb2e71d7006d3b38f15b91104.zip | |
fix: stuck ui states on newly created profile in conf items
| -rw-r--r-- | src/components/Content.tsx | 8 | ||||
| -rw-r--r-- | src/components/ProfileManagement.tsx | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/components/Content.tsx b/src/components/Content.tsx index d823257..7815951 100644 --- a/src/components/Content.tsx +++ b/src/components/Content.tsx @@ -33,7 +33,8 @@ export function Content() { const { currentProfile, - updateProfileConfig + updateProfileConfig, + loadProfiles } = useProfileManagement(); const { isInstalling, isUninstalling, handleInstall, handleUninstall } = useInstallationActions(); @@ -96,7 +97,10 @@ export function Content() { {isInstalled && ( <ProfileManagement currentProfile={currentProfile} - onProfileChange={() => loadLsfgConfig()} + onProfileChange={async () => { + await loadProfiles(); + await loadLsfgConfig(); + }} /> )} diff --git a/src/components/ProfileManagement.tsx b/src/components/ProfileManagement.tsx index a499836..83b5fa4 100644 --- a/src/components/ProfileManagement.tsx +++ b/src/components/ProfileManagement.tsx @@ -163,6 +163,8 @@ export function ProfileManagement({ currentProfile, onProfileChange }: ProfileMa if (result.success) { showSuccessToast("Profile created", `Created profile: ${profileName}`); await loadProfiles(); + // Automatically switch to the newly created profile + await handleProfileChange(profileName); } else { console.error("Failed to create profile:", result.error); showErrorToast("Failed to create profile", result.error || "Unknown error"); |
