()
| 61 | }) |
| 62 | |
| 63 | function handleScroll() { |
| 64 | if (!scrollRef) return |
| 65 | setState("scrollY", scrollRef.scrollTop) |
| 66 | if (state.autoScrolling) return |
| 67 | const { scrollTop, scrollHeight, clientHeight } = scrollRef |
| 68 | const atBottom = scrollHeight - scrollTop - clientHeight < 50 |
| 69 | if (!atBottom && working()) { |
| 70 | setState("userScrolled", true) |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | function handleInteraction() { |
| 75 | if (working()) { |
nothing calls this directly
no outgoing calls
no test coverage detected