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

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