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); }