fix(web): refresh does it even with no auto scroll
This commit is contained in:
parent
0e309e143c
commit
100c738336
2 changed files with 4 additions and 2 deletions
|
@ -172,6 +172,7 @@ pub fn App() -> impl IntoView {
|
|||
fn Scrollable() -> impl IntoView {
|
||||
let location = use_location();
|
||||
let feeds = use_context::<Feeds>().expect("missing feeds context");
|
||||
let auth = use_context::<Auth>().expect("missing auth context");
|
||||
let relevant_timeline = Signal::derive(move || {
|
||||
let path = location.pathname.get();
|
||||
if path.contains("/web/home") {
|
||||
|
@ -225,7 +226,7 @@ fn Scrollable() -> impl IntoView {
|
|||
<a class="breadcrumb mr-1" href="javascript:history.back()" ><b>"<<"</b></a>
|
||||
<b>{crate::NAME}</b>" :: "{breadcrumb}
|
||||
{move || relevant_timeline.get().map(|tl| view! {
|
||||
<a class="breadcrumb ml-1" href="#" on:click=move|_| tl.refresh() ><b>"↺"</b></a>
|
||||
<a class="breadcrumb ml-1" href="#" on:click=move|_| tl.refresh(auth) ><b>"↺"</b></a>
|
||||
})}
|
||||
</div>
|
||||
<Outlet />
|
||||
|
|
|
@ -40,7 +40,7 @@ impl Timeline {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn refresh(&self) {
|
||||
pub fn refresh(&self, auth: Auth) {
|
||||
self.reset(
|
||||
self.next
|
||||
.get_untracked()
|
||||
|
@ -48,6 +48,7 @@ impl Timeline {
|
|||
.next()
|
||||
.map(|x| x.to_string())
|
||||
);
|
||||
self.spawn_more(auth);
|
||||
}
|
||||
|
||||
pub fn spawn_more(&self, auth: Auth) {
|
||||
|
|
Loading…
Reference in a new issue