(state: UpdateInstallState, target: UpdateTarget)
| 332 | } |
| 333 | |
| 334 | function hasFreshActiveInstall(state: UpdateInstallState, target: UpdateTarget): boolean { |
| 335 | const active = state.active; |
| 336 | if (active === null || active.version !== target.version) return false; |
| 337 | const startedAt = Date.parse(active.startedAt); |
| 338 | if (!Number.isFinite(startedAt)) return false; |
| 339 | return Date.now() - startedAt < AUTO_INSTALL_ACTIVE_TTL_MS; |
| 340 | } |
| 341 | |
| 342 | async function showPendingBackgroundInstallNotice( |
| 343 | state: UpdateInstallState, |
no test coverage detected