feat: 添加sleepWithStop函数到2925邮箱会话管理器,优化登录流程中的重登录机制
This commit is contained in:
@@ -5398,6 +5398,7 @@ const mail2925SessionManager = self.MultiPageBackgroundMail2925Session?.createMa
|
|||||||
sendToMailContentScriptResilient,
|
sendToMailContentScriptResilient,
|
||||||
setPersistentSettings,
|
setPersistentSettings,
|
||||||
setState,
|
setState,
|
||||||
|
sleepWithStop,
|
||||||
throwIfStopped,
|
throwIfStopped,
|
||||||
upsertMail2925AccountInList,
|
upsertMail2925AccountInList,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
sendToMailContentScriptResilient,
|
sendToMailContentScriptResilient,
|
||||||
setPersistentSettings,
|
setPersistentSettings,
|
||||||
setState,
|
setState,
|
||||||
|
sleepWithStop,
|
||||||
throwIfStopped,
|
throwIfStopped,
|
||||||
upsertMail2925AccountInList,
|
upsertMail2925AccountInList,
|
||||||
} = deps;
|
} = deps;
|
||||||
@@ -366,6 +367,10 @@
|
|||||||
await addLog(`2925:已清理 ${removedCount} 个登录相关 cookie,准备使用 ${account.email} 重新登录。`, 'info');
|
await addLog(`2925:已清理 ${removedCount} 个登录相关 cookie,准备使用 ${account.email} 重新登录。`, 'info');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (forceRelogin && typeof sleepWithStop === 'function') {
|
||||||
|
await sleepWithStop(3000);
|
||||||
|
}
|
||||||
|
|
||||||
throwIfStopped();
|
throwIfStopped();
|
||||||
await reuseOrCreateTab(MAIL2925_SOURCE, forceRelogin ? MAIL2925_LOGIN_URL : MAIL2925_URL, {
|
await reuseOrCreateTab(MAIL2925_SOURCE, forceRelogin ? MAIL2925_LOGIN_URL : MAIL2925_URL, {
|
||||||
inject: MAIL2925_INJECT,
|
inject: MAIL2925_INJECT,
|
||||||
|
|||||||
Reference in New Issue
Block a user