MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / refreshWhenVisible

Function refreshWhenVisible

freebuff/web/src/app/live/live-stats-client.ts:67–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

65
66 const interval = window.setInterval(refresh, POLL_MS)
67 const refreshWhenVisible = () => {
68 if (document.visibilityState === 'visible') {
69 void refresh()
70 }
71 }
72
73 if (pauseWhenHidden) {
74 document.addEventListener('visibilitychange', refreshWhenVisible)

Callers

nothing calls this directly

Calls 1

refreshFunction · 0.85

Tested by

no test coverage detected