mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-05-31 11:08:26 +01:00
Merge branch 'develop' into feat/tv-interface
# Conflicts: # .gitignore # app/(auth)/(tabs)/(home)/_layout.tsx # components/PlatformDropdown.tsx # components/search/DiscoverFilters.tsx # components/video-player/controls/BottomControls.tsx # components/video-player/controls/TrickplayBubble.tsx # modules/mpv-player/ios/MPVLayerRenderer.swift
This commit is contained in:
@@ -13,11 +13,17 @@ export const excludeFields = (fieldsToExclude: ItemFields[]) => {
|
||||
);
|
||||
};
|
||||
|
||||
type ExtraQueryOptions = {
|
||||
gcTime?: number;
|
||||
staleTime?: number;
|
||||
};
|
||||
|
||||
export const useItemQuery = (
|
||||
itemId: string | undefined,
|
||||
isOffline?: boolean,
|
||||
fields?: ItemFields[],
|
||||
excludeFields?: ItemFields[],
|
||||
queryOptions?: ExtraQueryOptions,
|
||||
) => {
|
||||
const [api] = useAtom(apiAtom);
|
||||
const [user] = useAtom(userAtom);
|
||||
@@ -56,5 +62,6 @@ export const useItemQuery = (
|
||||
refetchOnWindowFocus: true,
|
||||
refetchOnReconnect: true,
|
||||
networkMode: "always",
|
||||
...queryOptions,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user