feat: 添加sleepWithStop函数到2925邮箱会话管理器,优化登录流程中的重登录机制
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user