fix(web): reset now also resets the next url

This commit is contained in:
əlemi 2024-11-09 13:52:57 +01:00
parent 4a4625f8e4
commit cc972e1e0b
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -35,19 +35,19 @@ impl Timeline {
pub fn reset(&self, url: Option<String>) { pub fn reset(&self, url: Option<String>) {
self.feed.set(vec![]); self.feed.set(vec![]);
self.over.set(false); self.over.set(false);
if let Some(url) = url { let url = url.unwrap_or_else(||
self.next.set(url);
}
}
pub fn refresh(&self, auth: Auth, config: Signal<crate::Config>) {
self.reset(
self.next self.next
.get_untracked() .get_untracked()
.split('?') .split('?')
.next() .next()
.map(|x| x.to_string()) .map(|x| x.to_string())
.unwrap_or("".to_string())
); );
self.next.set(url);
}
pub fn refresh(&self, auth: Auth, config: Signal<crate::Config>) {
self.reset(None);
self.spawn_more(auth, config); self.spawn_more(auth, config);
} }