perf: avoid reloading active config when editing inactive subscription

This commit is contained in:
wonfen
2025-04-25 14:37:50 +08:00
parent 8d62c0d521
commit bd3231bfa8
3 changed files with 16 additions and 4 deletions

View File

@@ -469,9 +469,12 @@ const ProfilePage = () => {
<ProfileViewer
ref={viewerRef}
onChange={async () => {
onChange={async (isActivating) => {
mutateProfiles();
await onEnhance(false);
// 只有更改当前激活的配置时才触发全局重新加载
if (isActivating) {
await onEnhance(false);
}
}}
/>
<ConfigViewer ref={configRef} />