diff --git a/web/src/components/timeline.rs b/web/src/components/timeline.rs index 7f0724e3..6002f1ec 100644 --- a/web/src/components/timeline.rs +++ b/web/src/components/timeline.rs @@ -8,18 +8,21 @@ use crate::prelude::*; pub struct Timeline { pub feed: RwSignal>, pub next: RwSignal, + pub over: RwSignal, } impl Timeline { pub fn new(url: String) -> Self { let feed = create_rw_signal(vec![]); let next = create_rw_signal(url); - Timeline { feed, next } + let over = create_rw_signal(false); + Timeline { feed, next, over } } pub fn reset(&self, url: String) { self.feed.set(vec![]); self.next.set(url); + self.over.set(false); } pub async fn more(&self, auth: Signal>) -> reqwest::Result<()> { @@ -38,6 +41,8 @@ impl Timeline { if let Some(next) = collection.next().id() { self.next.set(next); + } else { + self.over.set(true); } Ok(()) @@ -157,7 +162,7 @@ pub fn TimelineFeed(tl: Timeline) -> impl IntoView { } } / > -
+