task-40: 页面隐藏降频与可见恢复测试

隐藏 60s/可见 10s 间隔自适应、切回可见立即刷新、开关关闭不刷
新、延迟刷新生效、隐藏仍轮询、事件绑定/解绑、隐藏不触发即时
刷新。修复 scheduleNextDelayed 被轮询定时器阻塞导致延迟前台刷
新永不触发的缺陷。共 8 个测试。
This commit is contained in:
2026-08-31 20:58:05 +08:00
parent 93943bb51a
commit d33316f093
2 changed files with 190 additions and 1 deletions
@@ -312,7 +312,7 @@ export function useTaskProgressLoop<TDetail>(
}
function scheduleNextDelayed(delayMs: number) {
if (disposed || pollTimer != null) return
if (disposed) return
clearPollTimer()
const run = () => {
pollTimer = null