fix(web): reset now also resets the next url
This commit is contained in:
parent
4a4625f8e4
commit
cc972e1e0b
1 changed files with 7 additions and 7 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue