From cc972e1e0be9cc9db2bf1292869f6052232734a7 Mon Sep 17 00:00:00 2001 From: alemi Date: Sat, 9 Nov 2024 13:52:57 +0100 Subject: [PATCH] fix(web): reset now also resets the next url --- web/src/timeline/mod.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/web/src/timeline/mod.rs b/web/src/timeline/mod.rs index 10ef395..539a20e 100644 --- a/web/src/timeline/mod.rs +++ b/web/src/timeline/mod.rs @@ -35,19 +35,19 @@ impl Timeline { pub fn reset(&self, url: Option) { self.feed.set(vec![]); self.over.set(false); - if let Some(url) = url { - self.next.set(url); - } - } - - pub fn refresh(&self, auth: Auth, config: Signal) { - self.reset( + let url = url.unwrap_or_else(|| self.next .get_untracked() .split('?') .next() .map(|x| x.to_string()) + .unwrap_or("".to_string()) ); + self.next.set(url); + } + + pub fn refresh(&self, auth: Auth, config: Signal) { + self.reset(None); self.spawn_more(auth, config); }