From 8b04833a6a376788a89f443588363a716e62d61c Mon Sep 17 00:00:00 2001 From: linyuchen Date: Wed, 23 Oct 2024 17:10:33 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E9=80=80=E5=87=BA=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E7=95=8C=E9=9D=A2=E6=97=B6=E6=A3=80=E6=9F=A5=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=98=AF=E5=90=A6=E6=94=B9=E5=8A=A8=E5=B9=B6=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E7=94=A8=E6=88=B7=E4=BF=9D=E5=AD=98=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/index.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/renderer/index.ts b/src/renderer/index.ts index 22fc53b..8b3eb06 100644 --- a/src/renderer/index.ts +++ b/src/renderer/index.ts @@ -456,9 +456,11 @@ async function onSettingWindowCreated(view: Element) { } window.llonebot.checkVersion().then(checkVersionFunc) window.addEventListener('beforeunload', () => { - if (JSON.stringify(ob11Config) === JSON.stringify(config.ob11)) return - config.ob11 = ob11Config - window.llonebot.setConfig(true, config) + window.llonebot.getConfig().then(oldConfig=>{ + if(JSON.stringify(oldConfig) !== JSON.stringify(config)){ + window.llonebot.setConfig(true, config) + } + }) }) }