From f8f07e9015a3779031f757193fe13968a2c06ccd Mon Sep 17 00:00:00 2001 From: thislight Date: Sun, 27 Oct 2024 00:29:14 +0800 Subject: [PATCH] TrendTimelinePanel: remove prefetching --- src/timelines/TrendTimelinePanel.tsx | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/src/timelines/TrendTimelinePanel.tsx b/src/timelines/TrendTimelinePanel.tsx index a2370e8..ef4c360 100644 --- a/src/timelines/TrendTimelinePanel.tsx +++ b/src/timelines/TrendTimelinePanel.tsx @@ -1,9 +1,7 @@ import { Component, For, - onCleanup, createSignal, - untrack, Match, Switch as JsSwitch, ErrorBoundary, @@ -18,7 +16,6 @@ import Thread from "./Thread.jsx"; const TrendTimelinePanel: Component<{ client: mastodon.rest.Client; - prefetch?: boolean; openFullScreenToot: ( toot: mastodon.v1.Status, @@ -37,13 +34,6 @@ const TrendTimelinePanel: Component<{ ); const [expandedId, setExpandedId] = createSignal(); - const tlEndObserver = new IntersectionObserver(() => { - if (untrack(() => props.prefetch) && !snapshot.loading) - refetchTimeline(); - }); - - onCleanup(() => tlEndObserver.disconnect()); - const isExpandedId = createSelector(expandedId); const isExpanded = (st: mastodon.v1.Status) => isExpandedId(st.id); @@ -123,7 +113,7 @@ const TrendTimelinePanel: Component<{ toots={item} onBoost={(...args) => onBoost(index(), ...args)} onBookmark={(...args) => onBookmark(index(), ...args)} - onReply={(client, status) => + onReply={({ status }, element) => props.openFullScreenToot(status, element, true) } client={props.client} @@ -140,8 +130,6 @@ const TrendTimelinePanel: Component<{ }} - -
tlEndObserver.observe(e)}>
@@ -162,16 +150,6 @@ const TrendTimelinePanel: Component<{ > Retry - - - -