diff --git a/web/src/components/timeline.rs b/web/src/components/timeline.rs index 9749ac5c..0f6ed6da 100644 --- a/web/src/components/timeline.rs +++ b/web/src/components/timeline.rs @@ -21,6 +21,14 @@ impl Timeline { Timeline { feed, next, over, loading } } + pub fn len(&self) -> usize { + self.feed.get().len() + } + + pub fn is_empty(&self) -> bool { + self.feed.get().is_empty() + } + pub fn reset(&self, url: String) { self.feed.set(vec![]); self.next.set(url); diff --git a/web/src/page.rs b/web/src/page.rs index f3c3df70..03ba6af5 100644 --- a/web/src/page.rs +++ b/web/src/page.rs @@ -75,7 +75,22 @@ pub fn UserPage(tl: Timeline) -> impl IntoView { }); view! {
loading ...
}.into_view(),