From f242b21a1b55c7526ec6f809123777a88da1a79d Mon Sep 17 00:00:00 2001 From: allen2fuc Date: Mon, 6 Jul 2026 18:53:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=9B=9E=E6=BB=9A=E5=92=8C?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E6=97=B6=E6=A3=80=E6=9F=A5dsp=5Fenable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/pages/AIPage.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/src/pages/AIPage.tsx b/client/src/pages/AIPage.tsx index a059752..be80501 100644 --- a/client/src/pages/AIPage.tsx +++ b/client/src/pages/AIPage.tsx @@ -694,12 +694,15 @@ export default function AIPage({ variant = "page", onClose }: AIPageProps = {}) ); const handleApplyToggle = useCallback( - (msg: OptimizeUIMessage) => { + async (msg: OptimizeUIMessage) => { if (!api) { toast.error(aiText.deviceDisconnected); return; } - if ((deviceState?.peqEnable ?? 0) !== 1) { + const deviceState = await api.getDeviceState(); + console.log("deviceState.dsp_enable", deviceState?.dsp_enable); + if ((deviceState?.dsp_enable ?? 0) !== 1) { + console.log("dsp_enable is not enabled"); setPendingApplyMsg(msg); return; }