重命名 EQ 名称增加等待时间

This commit is contained in:
eafonyang
2026-07-07 09:48:39 +08:00
parent 3e7f790d0a
commit 61fc54cd5a
+2
View File
@@ -1929,9 +1929,11 @@ export default function EQPage() {
// Use api.upgradePeqChange directly (NOT the DeviceContext wrapper)
// to avoid applyPeqFiltersToState side-effect that overwrites current UI bands.
await api.upgradePeqChange(payload);
await new Promise(r => setTimeout(r, 300));
// Step 2: peqRemove — delete the old preset
delete peqPresetCacheRef.current[oldName];
await api.removePeq([oldName]);
await new Promise(r => setTimeout(r, 300));
// Step 3: sync latest state from device
const latest = await fetchEqSyncPeq(api, "renamePreset");
applyPeqStateToUI(latest);