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>) {
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<crate::Config>) {
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<crate::Config>) {
self.reset(None);
self.spawn_more(auth, config);
}