From 100c738336b8559ec2fedbbed0a039a0242b54a3 Mon Sep 17 00:00:00 2001 From: alemi Date: Tue, 13 Aug 2024 20:27:35 +0200 Subject: [PATCH] fix(web): refresh does it even with no auto scroll --- web/src/app.rs | 3 ++- web/src/timeline/mod.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/web/src/app.rs b/web/src/app.rs index befd96f..96a3c0d 100644 --- a/web/src/app.rs +++ b/web/src/app.rs @@ -172,6 +172,7 @@ pub fn App() -> impl IntoView { fn Scrollable() -> impl IntoView { let location = use_location(); let feeds = use_context::().expect("missing feeds context"); + let auth = use_context::().expect("missing auth context"); let relevant_timeline = Signal::derive(move || { let path = location.pathname.get(); if path.contains("/web/home") { @@ -225,7 +226,7 @@ fn Scrollable() -> impl IntoView { "<<" {crate::NAME}" :: "{breadcrumb} {move || relevant_timeline.get().map(|tl| view! { - "↺" + "↺" })} diff --git a/web/src/timeline/mod.rs b/web/src/timeline/mod.rs index 6991f3c..ccfe02c 100644 --- a/web/src/timeline/mod.rs +++ b/web/src/timeline/mod.rs @@ -40,7 +40,7 @@ impl Timeline { } } - pub fn refresh(&self) { + pub fn refresh(&self, auth: Auth) { self.reset( self.next .get_untracked() @@ -48,6 +48,7 @@ impl Timeline { .next() .map(|x| x.to_string()) ); + self.spawn_more(auth); } pub fn spawn_more(&self, auth: Auth) {