From d59f48aa1d56b12aac6554e1133914a7b6e30028 Mon Sep 17 00:00:00 2001 From: alemi Date: Sat, 25 May 2024 07:03:38 +0200 Subject: [PATCH] fix(web): maybe fix initial infiniscroll when short --- web/Cargo.toml | 4 ++-- web/src/components/timeline.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/Cargo.toml b/web/Cargo.toml index a7dc2f5f..050b378d 100644 --- a/web/Cargo.toml +++ b/web/Cargo.toml @@ -28,11 +28,11 @@ leptos_router = { version = "0.6", features = ["csr"] } leptos-use = { version = "0.10", features = ["serde"] } reqwest = { version = "0.12", features = ["json"] } apb = { path = "../apb", features = ["unstructured", "activitypub-fe", "activitypub-counters", "litepub"] } -uriproxy = { path = "../uriproxy/" } +uriproxy = { path = "../utils/uriproxy/" } futures = "0.3.30" lazy_static = "1.4" chrono = { version = "0.4", features = ["serde"] } web-sys = { version = "0.3", features = ["Screen"] } -mdhtml = { path = "../mdhtml/" } +mdhtml = { path = "../utils/mdhtml/" } jrd = "0.1" tld = "2.35" diff --git a/web/src/components/timeline.rs b/web/src/components/timeline.rs index 8fee1712..573e29ce 100644 --- a/web/src/components/timeline.rs +++ b/web/src/components/timeline.rs @@ -151,7 +151,7 @@ pub fn TimelineFeed(tl: Timeline) -> impl IntoView { move || (scroll_debounced.get(), height.get()), move |(s, h)| async move { if !config.get().infinite_scroll { return } - if s > 0.0 && h - s < view_height && !tl.loading.get() { + if !tl.loading.get() && h - s < view_height { if let Err(e) = tl.more(auth).await { tracing::error!("auto load failed: {e}"); }