From f4c7cdc5145ad249190e001b044d4681838aeb68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicole=20Miko=C5=82ajczyk?= Date: Thu, 10 Apr 2025 22:47:34 +0200 Subject: [PATCH] pl-fe: do not attempt to fetch scheduled statuses when not supported MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicole Mikołajczyk --- packages/pl-fe/src/features/ui/index.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/pl-fe/src/features/ui/index.tsx b/packages/pl-fe/src/features/ui/index.tsx index 61f8260c5..952a5733a 100644 --- a/packages/pl-fe/src/features/ui/index.tsx +++ b/packages/pl-fe/src/features/ui/index.tsx @@ -415,11 +415,13 @@ const UI: React.FC = React.memo(({ children }) => { })); } - if (account.is_admin) { + if (account.is_admin && features.pleromaAdminAccounts) { dispatch(fetchConfig()); } - setTimeout(() => dispatch(fetchFilters()), 500); + if (features.filters || features.filtersV2) { + setTimeout(() => dispatch(fetchFilters()), 500); + } if (account.locked) { setTimeout(() => prefetchFollowRequests(client), 700); @@ -429,9 +431,11 @@ const UI: React.FC = React.memo(({ children }) => { dispatch(connectShoutbox()); } - setTimeout(() => { - queryClient.prefetchInfiniteQuery(scheduledStatusesQueryOptions); - }, 900); + if (features.scheduledStatuses) { + setTimeout(() => { + queryClient.prefetchInfiniteQuery(scheduledStatusesQueryOptions); + }, 900); + } }; useEffect(() => {