mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 04:33:45 +08:00
fix: do not reactive when changed profile is not current
This commit is contained in:
parent
80d3c9e96f
commit
041522f94e
@ -429,7 +429,9 @@ const ProfilePage = () => {
|
|||||||
onSelect={(f) => onSelect(item.uid, f)}
|
onSelect={(f) => onSelect(item.uid, f)}
|
||||||
onEdit={() => viewerRef.current?.edit(item)}
|
onEdit={() => viewerRef.current?.edit(item)}
|
||||||
onChange={async (prev, curr) => {
|
onChange={async (prev, curr) => {
|
||||||
prev !== curr && (await onEnhance());
|
if (prev !== curr && profiles.current === item.uid) {
|
||||||
|
await onEnhance();
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
onDelete={() => onDelete(item.uid)}
|
onDelete={() => onDelete(item.uid)}
|
||||||
/>
|
/>
|
||||||
@ -466,7 +468,9 @@ const ProfilePage = () => {
|
|||||||
onMoveEnd={() => onMoveEnd(item.uid)}
|
onMoveEnd={() => onMoveEnd(item.uid)}
|
||||||
onEdit={() => viewerRef.current?.edit(item)}
|
onEdit={() => viewerRef.current?.edit(item)}
|
||||||
onChange={async (prev, curr) => {
|
onChange={async (prev, curr) => {
|
||||||
prev !== curr && (await onEnhance());
|
if (prev !== curr && chain.includes(item.uid)) {
|
||||||
|
await onEnhance();
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user