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; }