pl-fe: do not attempt to fetch scheduled statuses when not supported

Signed-off-by: Nicole Mikołajczyk <git@mkljczk.pl>
This commit is contained in:
Nicole Mikołajczyk
2025-04-10 22:47:34 +02:00
parent b236c516aa
commit f4c7cdc514

View File

@ -415,11 +415,13 @@ const UI: React.FC<IUI> = 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<IUI> = React.memo(({ children }) => {
dispatch(connectShoutbox());
}
setTimeout(() => {
queryClient.prefetchInfiniteQuery(scheduledStatusesQueryOptions);
}, 900);
if (features.scheduledStatuses) {
setTimeout(() => {
queryClient.prefetchInfiniteQuery(scheduledStatusesQueryOptions);
}, 900);
}
};
useEffect(() => {