aboutsummaryrefslogtreecommitdiff
path: root/loading/lifecycle.ts
blob: ef9f2d8768a6387b6160c3f94d610c16de4c232e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
let completed = false

/**
 * Whether the initial-load pipeline has finished during this browser
 * session. Navigating away from the Begin screen and returning should
 * not replay the progress bar — once it has run, it has run.
 */
export function hasCompletedInitialLoad(): boolean {
  return completed
}

/** Record that the initial load has finished. Idempotent. */
export function markInitialLoadComplete(): void {
  completed = true
}