feat: 添加sleepWithStop函数到2925邮箱会话管理器,优化登录流程中的重登录机制

This commit is contained in:
QLHazyCoder
2026-04-21 01:11:24 +08:00
parent 6c17ffc7f4
commit 45b02a7107
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -5398,6 +5398,7 @@ const mail2925SessionManager = self.MultiPageBackgroundMail2925Session?.createMa
sendToMailContentScriptResilient,
setPersistentSettings,
setState,
sleepWithStop,
throwIfStopped,
upsertMail2925AccountInList,
});
+5
View File
@@ -20,6 +20,7 @@
sendToMailContentScriptResilient,
setPersistentSettings,
setState,
sleepWithStop,
throwIfStopped,
upsertMail2925AccountInList,
} = deps;
@@ -366,6 +367,10 @@
await addLog(`2925:已清理 ${removedCount} 个登录相关 cookie,准备使用 ${account.email} 重新登录。`, 'info');
}
if (forceRelogin && typeof sleepWithStop === 'function') {
await sleepWithStop(3000);
}
throwIfStopped();
await reuseOrCreateTab(MAIL2925_SOURCE, forceRelogin ? MAIL2925_LOGIN_URL : MAIL2925_URL, {
inject: MAIL2925_INJECT,