()
| 53 | } |
| 54 | }; |
| 55 | const visibilityChanged = () => { |
| 56 | invalidate(); |
| 57 | setReading((previous) => ({ ...previous, loading: false })); |
| 58 | if (visible() && !paused) void poll(); |
| 59 | }; |
| 60 | refreshRef.current = () => { void poll(); }; |
| 61 | document.addEventListener('visibilitychange', visibilityChanged); |
| 62 | if (visible() && !paused) void poll(); |
nothing calls this directly
no test coverage detected