🐛 修复用户数据缺失

This commit is contained in:
BTMuli
2023-09-07 15:46:48 +08:00
parent 2a696d77b4
commit fcb158a7eb
3 changed files with 14 additions and 12 deletions

View File

@@ -311,6 +311,8 @@ async function confirmRefreshUser(): Promise<void> {
if (Array.isArray(accountRes)) {
loadingTitle.value = "获取成功!正在保存到数据库!";
await TGSqlite.saveAccount(accountRes);
const curAccount = await TGSqlite.getCurAccount();
if (curAccount) userStore.setCurAccount(curAccount);
} else {
console.error(accountRes);
loadingTitle.value = "获取失败!";