mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-15 13:14:35 +00:00
chore: cleanup
This commit is contained in:
@@ -78,11 +78,13 @@ export function createAutoScroll(options: AutoScrollOptions) {
|
|||||||
|
|
||||||
const scrollToBottom = (force: boolean) => {
|
const scrollToBottom = (force: boolean) => {
|
||||||
if (!force && !active()) return
|
if (!force && !active()) return
|
||||||
|
|
||||||
|
if (force && store.userScrolled) setStore("userScrolled", false)
|
||||||
|
|
||||||
const el = scroll
|
const el = scroll
|
||||||
if (!el) return
|
if (!el) return
|
||||||
|
|
||||||
if (!force && store.userScrolled) return
|
if (!force && store.userScrolled) return
|
||||||
if (force && store.userScrolled) setStore("userScrolled", false)
|
|
||||||
|
|
||||||
const distance = distanceFromBottom(el)
|
const distance = distanceFromBottom(el)
|
||||||
if (distance < 2) {
|
if (distance < 2) {
|
||||||
|
|||||||
Reference in New Issue
Block a user