feat:新增了切换账号的功能 (#89)

This commit is contained in:
xuncha authored and GitHub committed 2026-01-24 12:43:09 +08:00
1 parent 16cbc6adb1
commit 3a10aeb23e
13 files changed
+300 -86

No files matched your search

+7 -1
View File
@@ -185,9 +185,15 @@ function App() {
const decryptKey = await configService.getDecryptKey()
const wxid = await configService.getMyWxid()
const onboardingDone = await configService.getOnboardingDone()
const wxidConfig = wxid ? await configService.getWxidConfig(wxid) : null
const effectiveDecryptKey = wxidConfig?.decryptKey || decryptKey
if (wxidConfig?.decryptKey && wxidConfig.decryptKey !== decryptKey) {
await configService.setDecryptKey(wxidConfig.decryptKey)
}
// 如果配置完整,自动测试连接
if (dbPath && decryptKey && wxid) {
if (dbPath && effectiveDecryptKey && wxid) {
if (!onboardingDone) {
await configService.setOnboardingDone(true)
}